Zac Medico
2018-08-11 21:11:54 UTC
Since RESTRICT="!test? ( test )" can be very useful within the context
of bug 663278, pass an appropriate uselist parameter to the RESTRICT
use_reduce call.
Bug: https://bugs.gentoo.org/663278
---
lib/portage/package/ebuild/config.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
index 220fa31bb..353ee239c 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -1675,13 +1675,10 @@ class config(object):
restrict = use_reduce(raw_restrict,
uselist=built_use, flat=True)
else:
- # Use matchnone=True to ignore USE conditional parts
- # of RESTRICT, since we want to know whether to mask
- # the "test" flag _before_ we know the USE values
- # that would be needed to evaluate the USE
- # conditionals (see bug #273272).
restrict = use_reduce(raw_restrict,
- matchnone=True, flat=True)
+ uselist=frozenset(x for x in self['USE'].split()
+ if x in explicit_iuse or iuse_implicit_match(x)),
+ flat=True)
except PortageException:
pass
else:
of bug 663278, pass an appropriate uselist parameter to the RESTRICT
use_reduce call.
Bug: https://bugs.gentoo.org/663278
---
lib/portage/package/ebuild/config.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
index 220fa31bb..353ee239c 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -1675,13 +1675,10 @@ class config(object):
restrict = use_reduce(raw_restrict,
uselist=built_use, flat=True)
else:
- # Use matchnone=True to ignore USE conditional parts
- # of RESTRICT, since we want to know whether to mask
- # the "test" flag _before_ we know the USE values
- # that would be needed to evaluate the USE
- # conditionals (see bug #273272).
restrict = use_reduce(raw_restrict,
- matchnone=True, flat=True)
+ uselist=frozenset(x for x in self['USE'].split()
+ if x in explicit_iuse or iuse_implicit_match(x)),
+ flat=True)
except PortageException:
pass
else:
--
2.16.4
2.16.4