summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-12 07:12:32 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-12 07:12:32 +0000
commit82bbec1e349fbaaba33c1b8a4d1a3bef39759e64 (patch)
treeddeb04998c9ebecc52ccb8a1758a88d0147c72da
parent3a5f35717fde787f4253520eedcfb03d7746bcab (diff)
downloadportage-82bbec1e349fbaaba33c1b8a4d1a3bef39759e64.tar.gz
portage-82bbec1e349fbaaba33c1b8a4d1a3bef39759e64.tar.bz2
portage-82bbec1e349fbaaba33c1b8a4d1a3bef39759e64.zip
Bug #234478 - Fix config._getMissingLicenses() to only access USE when
LICENSE is conditional since otherwise USE hasn't necessarily been calculated. svn path=/main/trunk/; revision=11401
-rw-r--r--pym/portage/__init__.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index d5b1867fa..49baf361a 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2357,9 +2357,15 @@ class config(object):
cpv_slot = "%s:%s" % (cpv, metadata["SLOT"])
for atom in match_to_list(cpv_slot, cpdict.keys()):
acceptable_licenses.update(cpdict[atom])
- license_struct = portage.dep.paren_reduce(metadata["LICENSE"])
+
+ license_str = metadata["LICENSE"]
+ if "?" in license_str:
+ use = metadata["USE"].split()
+ else:
+ use = []
+
license_struct = portage.dep.use_reduce(
- license_struct, uselist=metadata["USE"].split())
+ portage.dep.paren_reduce(license_str), uselist=use)
license_struct = portage.dep.dep_opconvert(license_struct)
return self._getMaskedLicenses(license_struct, acceptable_licenses)