diff options
Diffstat (limited to 'portato/backend/portage')
-rw-r--r-- | portato/backend/portage/package.py | 2 | ||||
-rw-r--r-- | portato/backend/portage/system.py | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py index d819f2d..4f4b618 100644 --- a/portato/backend/portage/package.py +++ b/portato/backend/portage/package.py @@ -86,7 +86,7 @@ class PortagePackage (Package): if status == "masked": return True elif status == "unmasked": return False else: - debug("BUG in flags.new_masking_status. It returns", status, error = True) + error("BUG in flags.new_masking_status. It returns \'%s\'", status) else: # we have not touched the status if self._status and ("profile" in self._status or "package.mask" in self._status): return True diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py index 739c577..92bdf51 100644 --- a/portato/backend/portage/system.py +++ b/portato/backend/portage/system.py @@ -16,7 +16,7 @@ import portage import package from settings import PortageSettings -from portato.helper import debug, unique_array +from portato.helper import * from portato.backend.system_interface import SystemInterface class PortageSystem (SystemInterface): @@ -121,12 +121,14 @@ class PortageSystem (SystemInterface): def find_best_match (self, search_key, only_installed = False): t = None + if not only_installed: - t = self.settings.porttree.dep_bestmatch(search_key) + t = self.find_packages(search_key) else: - t = self.settings.vartree.dep_bestmatch(search_key) + t = self.find_installed_packages(search_key) + if t: - return package.PortagePackage(t) + return self.find_best([x.get_cpv() for x in t]) return None def find_packages (self, search_key, masked=False): @@ -277,7 +279,7 @@ class PortageSystem (SystemInterface): best_p = self.find_best_match(p) if best_p is None: - debug("No best match for",p,"-- It seems not to be in the tree anymore.",warn = True) + warning("No best match for %s. It seems not to be in the tree anymore." % p) continue if len(inst) > 1: @@ -334,7 +336,7 @@ class PortageSystem (SystemInterface): oldList = self.sort_package_list(self.find_installed_packages(p.get_cp())) if not oldList: if add_not_installed: - debug("Not found installed",p.get_cpv(),"==> adding") + info("Found a not installed dependency: %s." % p.get_cpv()) oldList = [p] else: return @@ -374,7 +376,7 @@ class PortageSystem (SystemInterface): raw_checked.append(i) bm = self.get_new_packages([i]) if not bm: - debug("Bug? No best match could be found:",i) + warning("Bug? No best match could be found for %s.",i) else: for pkg in bm: if not pkg: continue |