summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/porttree.py31
1 files changed, 21 insertions, 10 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index aad388508..230c96cb6 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -597,14 +597,13 @@ class portdbapi(dbapi):
# Find the minimum matching visible version. This is optimized to
# minimize the number of metadata accesses (improves performance
# especially in cases where metadata needs to be generated).
- # This does not implement LICENSE filtering since it's only
- # intended for use by repoman.
if mydep == mykey:
mylist = self.cp_list(mykey)
else:
mylist = match_from_list(mydep, self.cp_list(mykey))
myval = ""
settings = self.mysettings
+ local_config = settings.local_config
if level == "minimum-visible":
iterfunc = iter
else:
@@ -626,6 +625,16 @@ class portdbapi(dbapi):
continue
if settings.getProfileMaskAtom(cpv, metadata):
continue
+ if local_config:
+ metadata["USE"] = ""
+ if "?" in metadata["LICENSE"]:
+ self.doebuild_settings.setcpv(cpv, mydb=metadata)
+ metadata["USE"] = self.doebuild_settings.get("USE", "")
+ try:
+ if settings.getMissingLicenses(cpv, metadata):
+ continue
+ except InvalidDependString:
+ continue
myval = cpv
break
elif level == "bestmatch-list":
@@ -702,6 +711,7 @@ class portdbapi(dbapi):
newlist=[]
aux_keys = ["IUSE", "KEYWORDS", "LICENSE", "EAPI", "SLOT"]
metadata = {}
+ local_config = self.mysettings.local_config
for mycpv in mylist:
metadata.clear()
try:
@@ -718,15 +728,16 @@ class portdbapi(dbapi):
continue
if self.mysettings.getMissingKeywords(mycpv, metadata):
continue
- metadata["USE"] = ""
- if "?" in metadata["LICENSE"]:
- self.doebuild_settings.setcpv(mycpv, mydb=metadata)
- metadata["USE"] = self.doebuild_settings.get("USE", "")
- try:
- if self.mysettings.getMissingLicenses(mycpv, metadata):
+ if local_config:
+ metadata["USE"] = ""
+ if "?" in metadata["LICENSE"]:
+ self.doebuild_settings.setcpv(mycpv, mydb=metadata)
+ metadata["USE"] = self.doebuild_settings.get("USE", "")
+ try:
+ if self.mysettings.getMissingLicenses(mycpv, metadata):
+ continue
+ except InvalidDependString:
continue
- except InvalidDependString:
- continue
newlist.append(mycpv)
return newlist