Re: [gentoo-portage-dev] [PATCH] config.setcpv: fix handling of IUSE changes (bug 611896)

2017-03-09 Thread Zac Medico
On Thu, Mar 9, 2017 at 5:33 PM, Brian Dolbec  wrote:
> On Thu,  9 Mar 2017 13:38:04 -0800
> Zac Medico  wrote:
>
>> 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
>
> looks good :)
>
> --
> Brian Dolbec 
>
>

Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=3ccd41702be7ed3f5bdbe123ec04349749b40c08

-- 
Thanks,
Zac



Re: [gentoo-portage-dev] [PATCH] config.setcpv: fix handling of IUSE changes (bug 611896)

2017-03-09 Thread Brian Dolbec
On Thu,  9 Mar 2017 13:38:04 -0800
Zac Medico  wrote:

> 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

looks good :)

-- 
Brian Dolbec 




[gentoo-portage-dev] [PATCH] config.setcpv: fix handling of IUSE changes (bug 611896)

2017-03-09 Thread Zac Medico
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