diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-12-04 16:58:58 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-12-04 16:58:58 -0800 |
commit | a1c89e016d692abd3faefadeac12423645ffcef8 (patch) | |
tree | 1aa8c38ff7d9fc7666ddf489384d81423973d045 | |
parent | 75d3130fc8293fff68389b8fed44b8d47a0abe80 (diff) | |
download | portage-a1c89e016d692abd3faefadeac12423645ffcef8.tar.gz portage-a1c89e016d692abd3faefadeac12423645ffcef8.tar.bz2 portage-a1c89e016d692abd3faefadeac12423645ffcef8.zip |
Package: Use IUSE to validate built USE
-rw-r--r-- | pym/_emerge/Package.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py index d048b2ace..009808f5f 100644 --- a/pym/_emerge/Package.py +++ b/pym/_emerge/Package.py @@ -321,6 +321,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() |