diff options
author | necoro <> | 2007-06-20 12:08:24 +0000 |
---|---|---|
committer | necoro <> | 2007-06-20 12:08:24 +0000 |
commit | 383a61d2b0cda8ebbe46468bb1b40bddd608c1fb (patch) | |
tree | 3c36dbfbdc0202a2883efe2f4297c6c0758f2340 /portato | |
parent | ce5a9758933751a7a0f0f6813f290a05f5b2a424 (diff) | |
download | portato-383a61d2b0cda8ebbe46468bb1b40bddd608c1fb.tar.gz portato-383a61d2b0cda8ebbe46468bb1b40bddd608c1fb.tar.bz2 portato-383a61d2b0cda8ebbe46468bb1b40bddd608c1fb.zip |
ignored None values in get_new_packages ... but now give a warning :)
Diffstat (limited to '')
-rw-r--r-- | portato/backend/portage/system.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py index ecdab4d..739c577 100644 --- a/portato/backend/portage/system.py +++ b/portato/backend/portage/system.py @@ -274,19 +274,25 @@ class PortageSystem (SystemInterface): new_packages = [] for p in packages: inst = self.find_installed_packages(p) + + 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) + continue + if len(inst) > 1: myslots = set() for i in inst: # get the slots of the installed packages myslots.add(i.get_package_settings("SLOT")) - myslots.add(self.find_best_match(p).get_package_settings("SLOT")) # add the slot of the best package in portage + myslots.add(best_p.get_package_settings("SLOT")) # add the slot of the best package in portage for slot in myslots: new_packages.append(\ self.find_best(\ [x.get_cpv() for x in self.find_packages("%s:%s" % (i.get_cp(), slot))]\ )) else: - new_packages.append(self.find_best_match(p)) + new_packages.append(best_p) return new_packages |