diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-12-05 14:36:16 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-12-05 14:37:37 -0800 |
commit | 3bdad37cad433034c0992936b41c84dc88d859b2 (patch) | |
tree | 79de8a3fc7a6ce3950fd076c56c0701581e09a6f | |
parent | a99744aebcf336357cca75be3f8a713dca55b8a2 (diff) | |
download | portage-3bdad37cad433034c0992936b41c84dc88d859b2.tar.gz portage-3bdad37cad433034c0992936b41c84dc88d859b2.tar.bz2 portage-3bdad37cad433034c0992936b41c84dc88d859b2.zip |
dbapi.match: Use IUSE to validate built USE
-rw-r--r-- | pym/portage/dbapi/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index 555125ac5..53adfbe74 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -151,7 +151,6 @@ class dbapi(object): iuse, slot, use = self.aux_get(cpv, ["IUSE", "SLOT", "USE"]) 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: @@ -163,6 +162,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) |