summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-06-26 23:01:46 +0000
committerZac Medico <zmedico@gentoo.org>2009-06-26 23:01:46 +0000
commit80d8bce1a6be1f869d7eb26247ae14351193fa7a (patch)
tree4e1c05e61a8c7f5145e089dedc49c72213160e72
parenta41de90811b4af4dd9f5cd8217be26d42976060d (diff)
downloadportage-80d8bce1a6be1f869d7eb26247ae14351193fa7a.tar.gz
portage-80d8bce1a6be1f869d7eb26247ae14351193fa7a.tar.bz2
portage-80d8bce1a6be1f869d7eb26247ae14351193fa7a.zip
Fix PROVIDE code since the Package class automatically evaluates USE
conditionals now. svn path=/main/trunk/; revision=13702
-rwxr-xr-xbin/repoman5
-rw-r--r--pym/_emerge/Package.py8
2 files changed, 9 insertions, 4 deletions
diff --git a/bin/repoman b/bin/repoman
index 1ca55cd8d..41c811039 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1237,14 +1237,15 @@ for x in scanlist:
# if x.startswith("no"):
# print "Bad RESTRICT value: %s" % x
try:
- myaux["PROVIDE"] = portage.dep.use_reduce(
+ portage.dep.use_reduce(
portage.dep.paren_reduce(myaux["PROVIDE"]), matchall=1)
except portage.exception.InvalidDependString, e:
stats["PROVIDE.syntax"] = stats["PROVIDE.syntax"] + 1
fails["PROVIDE.syntax"].append(mykey+".ebuild PROVIDE: "+str(e))
del e
continue
- myaux["PROVIDE"] = " ".join(portage.flatten(myaux["PROVIDE"]))
+
+ # The Package class automatically evaluates USE conditionals.
for myprovide in myaux["PROVIDE"].split():
prov_cp = portage.dep_getkey(myprovide)
if prov_cp != myprovide:
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 1d90975c7..938c17733 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -185,8 +185,12 @@ class _PackageMetadataWrapper(_PackageMetadataWrapperBase):
if k in self._use_conditional_keys:
if '?' in v:
try:
- v = paren_enclose(paren_normalize(use_reduce(
- paren_reduce(v), uselist=self._pkg.use.enabled)))
+ if self._pkg.root_config.settings.local_config:
+ v = paren_enclose(paren_normalize(use_reduce(
+ paren_reduce(v), uselist=self._pkg.use.enabled)))
+ else:
+ v = paren_enclose(paren_normalize(use_reduce(
+ paren_reduce(v), matchall=1)))
except portage.exception.InvalidDependString:
# This error should already have been registered via
# self._pkg._invalid_metadata().