aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2017-12-10 17:12:41 -0800
committerZac Medico <zmedico@gentoo.org>2017-12-10 18:31:45 -0800
commit2382082dcfce5e6c2be7c4dd6aed7c32e1d20616 (patch)
tree1ba52df17370a3821d758b3478e9ca4cc6016090 /pym/portage/package/ebuild
parentPORTAGE_XATTR_EXCLUDE: add common user.* attributes (bug 640290) (diff)
downloadportage-2382082dcfce5e6c2be7c4dd6aed7c32e1d20616.tar.gz
portage-2382082dcfce5e6c2be7c4dd6aed7c32e1d20616.tar.bz2
portage-2382082dcfce5e6c2be7c4dd6aed7c32e1d20616.zip
Handle binary package IUSE_IMPLICIT divergence (bug 640318)
Since profile IUSE_IMPLICIT settings may diverge from those that a binary package was built with, consider members of built USE settings to be members of IUSE_EFFECTIVE. Only do this for EAPIs that support IUSE_EFFECTIVE, since built USE settings for earlier EAPIs may contain a large number of irrelevant flags. Note that the binary package may be remote, so it's only possible to rely on metadata that is available in the remote Packages file, and the IUSE_IMPLICIT header in the Packages file is vulnerable to mutation. Bug: https://bugs.gentoo.org/640318
Diffstat (limited to 'pym/portage/package/ebuild')
-rw-r--r--pym/portage/package/ebuild/config.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index cd2b009aa..d0225a311 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1693,6 +1693,12 @@ class config(object):
iuse_implicit_match = self._iuse_effective_match
portage_iuse = set(self._iuse_effective)
portage_iuse.update(explicit_iuse)
+ if built_use is not None:
+ # When the binary package was built, the profile may have
+ # had different IUSE_IMPLICIT settings, so any member of
+ # the built USE setting is considered to be a member of
+ # IUSE_EFFECTIVE (see bug 640318).
+ portage_iuse.update(built_use)
self.configdict["pkg"]["IUSE_EFFECTIVE"] = \
" ".join(sorted(portage_iuse))
else: