Fix setcpv to correctly regenerate USE when the IUSE differs from
the previous setcpv call. Changes in IUSE affect USE_EXPAND
wildcard expansion in the regenerate method.

X-Gentoo-bug: 611896
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=611896
---
 pym/portage/package/ebuild/config.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index 4f7e5c9..ef29afe 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1623,6 +1623,10 @@ class config(object):
                elif previous_penv:
                        has_changed = True
 
+               if not (previous_iuse == iuse and
+                       previous_iuse_effective is not None == 
eapi_attrs.iuse_effective):
+                       has_changed = True
+
                if has_changed:
                        self.reset(keeping_pkg=1)
 
@@ -1645,8 +1649,7 @@ class config(object):
 
                # If reset() has not been called, it's safe to return
                # early if IUSE has not changed.
-               if not has_changed and previous_iuse == iuse and \
-                       (previous_iuse_effective is not None == 
eapi_attrs.iuse_effective):
+               if not has_changed:
                        return
 
                # Filter out USE flags that aren't part of IUSE. This has to
-- 
2.10.2


Reply via email to