Ejemplo n.º 1
0
    def _show_package_list(self, lst):
        '''Emit Package signals for a list of packages

        pkgs should be a list of (trove, status) tuples.

        Trove is a dict of {(name, version, flavor), metadata}, as constructed
        by _convert_package.
        '''
        def is_redirected_package(version):
            # The format of a revision string is
            #   "<upstream version>-<source count>-<build count>".
            # If upstream version is 0, the package has become nil.
            return version.split("-")[0] == "0"

        for pkg, status in lst:
            name, v, f = pkg["trove"]
            version = str(v.trailingRevision())
            if is_redirected_package(version):
                continue
            label = str(v.trailingLabel())
            arch = conarypk.get_arch(f)

            pkg_id = get_package_id(name, version, arch, label)

            summary = self._format_package_summary(
                name, pkg["metadata"].get("shortDesc", "").decode("UTF"))
            self.package(pkg_id, status, summary)
Ejemplo n.º 2
0
    def _show_package_list(self, lst):
        '''Emit Package signals for a list of packages

        pkgs should be a list of (trove, status) tuples.

        Trove is a dict of {(name, version, flavor), metadata}, as constructed
        by _convert_package.
        '''
        def is_redirected_package(version):
            # The format of a revision string is
            #   "<upstream version>-<source count>-<build count>".
            # If upstream version is 0, the package has become nil.
            return version.split("-")[0] == "0"

        for pkg, status in lst:
            name, v, f = pkg["trove"]
            version = str(v.trailingRevision())
            if is_redirected_package(version):
                continue
            label = str(v.trailingLabel())
            arch = conarypk.get_arch(f)

            pkg_id = get_package_id(name, version, arch, label)

            summary = self._format_package_summary(name,
                    pkg["metadata"].get("shortDesc", "").decode("UTF"))
            self.package(pkg_id, status, summary)
 def _get_package_id(name, v, f):
     version = str(v.trailingRevision())
     label = str(v.trailingLabel())
     arch = conarypk.get_arch(f)
     package_id = get_package_id(name, version, arch, label)
     return package_id
Ejemplo n.º 4
0
 def _get_package_id(name, v, f):
     version = str(v.trailingRevision())
     label = str(v.trailingLabel())
     arch = conarypk.get_arch(f)
     package_id = get_package_id(name, version, arch, label)
     return package_id