diff options
-rw-r--r-- | portato/backend/portage/package.py | 9 | ||||
-rw-r--r-- | portato/gui/gui_helper.py | 24 |
2 files changed, 23 insertions, 10 deletions
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py index 65522ec..2a2d81a 100644 --- a/portato/backend/portage/package.py +++ b/portato/backend/portage/package.py @@ -137,8 +137,13 @@ class PortagePackage (Package): actual = self.get_actual_use_flags() depstring = "" - for d in depvar: - depstring += self.get_package_settings(d, tree = self._settings.porttree)+" " + try: + for d in depvar: + depstring += self.get_package_settings(d, tree = self._settings.porttree)+" " + except KeyError: # not found in porttree - use vartree + depstring = "" + for d in depvar: + depstring += self.get_package_settings(d, tree = self._settings.vartree)+" " deps = portage.dep_check(depstring, None, self._settings.settings, myuse = actual, trees = self._trees) diff --git a/portato/gui/gui_helper.py b/portato/gui/gui_helper.py index 110b241..87fcf69 100644 --- a/portato/gui/gui_helper.py +++ b/portato/gui/gui_helper.py @@ -369,17 +369,25 @@ class EmergeQueue: elif cmp < 0: downgrade = True - if cmp != 0: - uVersion = old.get_version() + uVersion = old.get_version() - old_iuse = set(old.get_iuse_flags()) - new_iuse = set(pkg.get_iuse_flags()) + old_iuse = set(old.get_iuse_flags()) + new_iuse = set(pkg.get_iuse_flags()) - for i in old_iuse.difference(new_iuse): - changedUse.append("-"+i) + for i in old_iuse.difference(new_iuse): + changedUse.append("-"+i) - for i in new_iuse.difference(old_iuse): - changedUse.append("+"+i) + for i in new_iuse.difference(old_iuse): + changedUse.append("+"+i) + else: + old_iuse = set(pkg.get_iuse_flags(installed = True)) + new_iuse = set(pkg.get_iuse_flags(installed = False)) + + for i in old_iuse.difference(new_iuse): + changedUse.append("-"+i) + + for i in new_iuse.difference(old_iuse): + changedUse.append("+"+i) except backend.PackageNotFoundException, e: # package not found / package is masked -> delete current tree and re-raise the exception if self.tree.iter_has_parent(it): |