summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-04 16:58:58 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-04 17:02:10 -0800
commite7f0965e86c93146b1726087c76ea14593b2fd20 (patch)
treee9efc75948568e15df564aa653e42c8c75ef6bd9
parentc14338d82a451bfe6d4709dffe06e11333bd8e48 (diff)
downloadportage-e7f0965e86c93146b1726087c76ea14593b2fd20.tar.gz
portage-e7f0965e86c93146b1726087c76ea14593b2fd20.tar.bz2
portage-e7f0965e86c93146b1726087c76ea14593b2fd20.zip
Package: Use IUSE to validate built USE
-rw-r--r--pym/_emerge/Package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 361bfc70a..47a435f21 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -315,6 +315,14 @@ class Package(Task):
self._force = None
self._mask = None
self.enabled = frozenset(use_str.split())
+ if pkg.built:
+ # 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).
+ missing_iuse = pkg.iuse.get_missing_iuse(self.enabled)
+ if missing_iuse:
+ self.enabled = self.enabled.difference(missing_iuse)
def _init_force_mask(self):
pkgsettings = self._pkg._get_pkgsettings()