Esempio n. 1
0
File: retrace.py Progetto: abrt/faf
    def __init__(self, db_debug_package, db_src_package, bin_pkg_map, db=None):
        self.debuginfo = RetraceTaskPackage(db_debug_package)
        if self.debuginfo.path is None:
            raise IncompleteTask("Package lob for {0} not found in storage"
                                 .format(self.debuginfo.nvra))

        if db is None:
            self.debuginfo.debug_files = None
        else:
            self.debuginfo.debug_files = get_debug_files(db, db_debug_package)

        if db_src_package is None:
            self.source = None
        else:
            self.source = RetraceTaskPackage(db_src_package)
            if self.source.path is None:
                raise IncompleteTask("Package lob for {0} not found in storage"
                                     .format(self.source.nvra))

        self.binary_packages = {}
        if bin_pkg_map is not None:
            for db_bin_package, db_ssources in bin_pkg_map.items():
                pkgobj = RetraceTaskPackage(db_bin_package)
                if pkgobj.path is None:
                    raise IncompleteTask("Package lob for {0} not found in "
                                         "storage".format(pkgobj.nvra))

                self.binary_packages[pkgobj] = db_ssources
Esempio n. 2
0
    def __init__(self, db_debug_package, db_src_package, bin_pkg_map, db=None):
        self.debuginfo = RetraceTaskPackage(db_debug_package)
        if self.debuginfo.path is None:
            raise IncompleteTask(
                "Package lob for {0} not found in storage".format(
                    self.debuginfo.nvra))

        if db is None:
            self.debuginfo.debug_files = None
        else:
            self.debuginfo.debug_files = get_debug_files(db, db_debug_package)

        if db_src_package is None:
            self.source = None
        else:
            self.source = RetraceTaskPackage(db_src_package)
            if self.source.path is None:
                raise IncompleteTask(
                    "Package lob for {0} not found in storage".format(
                        self.source.nvra))

        self.binary_packages = {}
        if bin_pkg_map is not None:
            for db_bin_package, db_ssources in bin_pkg_map.items():
                pkgobj = RetraceTaskPackage(db_bin_package)
                if pkgobj.path is None:
                    raise IncompleteTask("Package lob for {0} not found in "
                                         "storage".format(pkgobj.nvra))

                self.binary_packages[pkgobj] = db_ssources
Esempio n. 3
0
    def __init__(self,
                 db_debug_package: Package,
                 db_src_package: Package,
                 bin_pkg_map: Optional[Dict[Package, List[SymbolSource]]],
                 db: Optional[Database] = None) -> None:
        self.debuginfo = RetraceTaskPackage(db_debug_package)
        if self.debuginfo.path is None:
            raise IncompleteTask(
                "Package lob for {0} not found in storage".format(
                    self.debuginfo.nvra))

        if db is not None:
            self.debuginfo.debug_files = get_debug_files(db, db_debug_package)

        if db_src_package is None:
            self.source = None
        else:
            self.source = RetraceTaskPackage(db_src_package)
            if self.source.path is None:
                raise IncompleteTask(
                    "Package lob for {0} not found in storage".format(
                        self.source.nvra))

        self.binary_packages: Dict[RetraceTaskPackage, List[SymbolSource]] = {}
        if bin_pkg_map is not None:
            for db_bin_package, db_ssources in bin_pkg_map.items():
                pkgobj = RetraceTaskPackage(db_bin_package)
                if pkgobj.path is None:
                    raise IncompleteTask("Package lob for {0} not found in "
                                         "storage".format(pkgobj.nvra))

                self.binary_packages[pkgobj] = db_ssources