summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-08-24 14:14:43 +0200
committerZac Medico <zmedico@gentoo.org>2010-08-24 06:48:40 -0700
commit32214f9351e680a3f6d4802cbff4748f6561f93c (patch)
tree2eae53cd9d0be08ee060b9f17346823b1661b32f /pym/portage
parent9ed91aff33d645d9d846d416cf21de33ab968f54 (diff)
downloadportage-32214f9351e680a3f6d4802cbff4748f6561f93c.tar.gz
portage-32214f9351e680a3f6d4802cbff4748f6561f93c.tar.bz2
portage-32214f9351e680a3f6d4802cbff4748f6561f93c.zip
More _pkg_use_enabled fixes
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/sets/base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/sets/base.py b/pym/portage/sets/base.py
index f2e745157..f3cf37359 100644
--- a/pym/portage/sets/base.py
+++ b/pym/portage/sets/base.py
@@ -114,12 +114,16 @@ class PackageSet(object):
self._atommap.setdefault(a.cp, set()).add(a)
# Not sure if this one should really be in PackageSet
- def findAtomForPackage(self, pkg):
+ def findAtomForPackage(self, pkg, modified_use=None):
"""Return the best match for a given package from the arguments, or
None if there are no matches. This matches virtual arguments against
the PROVIDE metadata. This can raise an InvalidDependString exception
if an error occurs while parsing PROVIDE."""
+ if modified_use is not None and modified_use is not pkg.use.enabled:
+ pkg = pkg.copy()
+ pkg.metadata["USE"] = " ".join(modified_use)
+
# Atoms matched via PROVIDE must be temporarily transformed since
# match_from_list() only works correctly when atom.cp == pkg.cp.
rev_transform = {}