Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH] config.setcpv: fix handling of IUSE changes (bug 611896)
Date: Thu, 09 Mar 2017 21:38:32
Message-Id: 20170309213804.12410-1-zmedico@gentoo.org
1 Fix setcpv to correctly regenerate USE when the IUSE differs from
2 the previous setcpv call. Changes in IUSE affect USE_EXPAND
3 wildcard expansion in the regenerate method.
4
5 X-Gentoo-bug: 611896
6 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=611896
7 ---
8 pym/portage/package/ebuild/config.py | 7 +++++--
9 1 file changed, 5 insertions(+), 2 deletions(-)
10
11 diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
12 index 4f7e5c9..ef29afe 100644
13 --- a/pym/portage/package/ebuild/config.py
14 +++ b/pym/portage/package/ebuild/config.py
15 @@ -1623,6 +1623,10 @@ class config(object):
16 elif previous_penv:
17 has_changed = True
18
19 + if not (previous_iuse == iuse and
20 + previous_iuse_effective is not None == eapi_attrs.iuse_effective):
21 + has_changed = True
22 +
23 if has_changed:
24 self.reset(keeping_pkg=1)
25
26 @@ -1645,8 +1649,7 @@ class config(object):
27
28 # If reset() has not been called, it's safe to return
29 # early if IUSE has not changed.
30 - if not has_changed and previous_iuse == iuse and \
31 - (previous_iuse_effective is not None == eapi_attrs.iuse_effective):
32 + if not has_changed:
33 return
34
35 # Filter out USE flags that aren't part of IUSE. This has to
36 --
37 2.10.2

Replies