summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-05 14:36:16 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-05 14:36:16 -0800
commitd463781a50c93f833b6c310f51a36136f3334e84 (patch)
tree5435fb6a56d53adb3448e97aa3b508e32a1727fa
parentf96dc437d7dd9234eaf40ad0e9d44470c4a25d15 (diff)
downloadportage-d463781a50c93f833b6c310f51a36136f3334e84.tar.gz
portage-d463781a50c93f833b6c310f51a36136f3334e84.tar.bz2
portage-d463781a50c93f833b6c310f51a36136f3334e84.zip
dbapi.match: Use IUSE to validate built USE
-rw-r--r--pym/portage/dbapi/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index 94fbc47b0..0708d6840 100644
--- a/pym/portage/dbapi/__init__.py
+++ b/pym/portage/dbapi/__init__.py
@@ -162,7 +162,6 @@ class dbapi(object):
iuse, slot, use = self.aux_get(cpv, ["IUSE", "SLOT", "USE"], myrepo=myrepo)
except KeyError:
continue
- use = use.split()
iuse = frozenset(x.lstrip('+-') for x in iuse.split())
missing_iuse = False
for x in atom.unevaluated_atom.use.required:
@@ -174,6 +173,12 @@ class dbapi(object):
if not atom.use:
pass
elif not self._use_mutable:
+ # Use IUSE to validate USE settings for built packages,
+ # in case the package manager that built this package
+ # failed to do that for some reason (or in case of
+ # data corruption).
+ use = frozenset(x for x in use.split() if x in iuse or \
+ iuse_implicit_match(x))
missing_enabled = atom.use.missing_enabled.difference(iuse)
missing_disabled = atom.use.missing_disabled.difference(iuse)