diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-12-24 16:46:01 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-12-24 16:54:04 -0800 |
commit | 6bbc8c7051ca2e7092c4437b1be30dde881f521e (patch) | |
tree | 2499159a10975450e191ca191bea0bab022d7eef | |
parent | 990c9cae510f4ce314bd08fc9f18866a49f44132 (diff) | |
download | portage-6bbc8c7051ca2e7092c4437b1be30dde881f521e.tar.gz portage-6bbc8c7051ca2e7092c4437b1be30dde881f521e.tar.bz2 portage-6bbc8c7051ca2e7092c4437b1be30dde881f521e.zip |
depgraph: Optimize --newuse with Package attrs.
-rw-r--r-- | pym/_emerge/depgraph.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 0316a9863..7e8cd2bef 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -54,7 +54,7 @@ from _emerge.UnmergeDepPriority import UnmergeDepPriority from _emerge.resolver.slot_collision import slot_conflict_handler from _emerge.resolver.circular_dependency import circular_dependency_handler -from _emerge.resolver.output import display, filter_iuse_defaults +from _emerge.resolver.output import display if sys.hexversion >= 0x3000000: basestring = str @@ -3078,9 +3078,9 @@ class depgraph(object): forced_flags = set() forced_flags.update(pkg.use.force) forced_flags.update(pkg.use.mask) - old_use = vardb.aux_get(cpv, ["USE"])[0].split() - old_iuse = set(filter_iuse_defaults( - vardb.aux_get(cpv, ["IUSE"])[0].split())) + inst_pkg = vardb.match_pkgs('=' + pkg.cpv)[0] + old_use = inst_pkg.use.enabled + old_iuse = inst_pkg.iuse.all cur_use = self._pkg_use_enabled(pkg) cur_iuse = pkg.iuse.all reinstall_for_flags = \ |