Re: [gentoo-portage-dev] [PATCH] depgraph.autounmask_breakage_detected: ignore REQUIRED_USE violations (bug 654782)

2018-05-04 Thread Zac Medico
On 05/04/2018 06:17 AM, M. J. Everitt wrote:
> On 04/05/18 06:22, Zac Medico wrote:
>> When autounmask USE changes violate REQUIRED_USE, rather than
>> recalculate with autounmask disabled, display the autounmask USE
>> changes along with the REQUIRED_USE violation. Adjust unit tests
>> to allow for the autounmask USE changes that were previously
>> discarded. For the case reported in bug 654782, the output will
>> appear as follows:
>>
>> The following keyword changes are necessary to proceed:
>>  (see "package.accept_keywords" in the portage(5) man page for more details)
>> # required by =retext-7.0.1-r1 (argument)
>> =app-editors/retext-7.0.1-r1 ~amd64
>>
>> The following USE changes are necessary to proceed:
>>  (see "package.use" in the portage(5) man page for more details)
>> # required by app-editors/retext-7.0.1-r1::gentoo
>> # required by =retext-7.0.1-r1 (argument)
>>> =dev-python/PyQt5-5.9.2 printsupport webengine network gui widgets
>> !!! The ebuild selected to satisfy 
>> "dev-python/PyQt5[gui,network,printsupport,webengine,widgets,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]"
>>  has unmet requirements.
>> - dev-python/PyQt5-5.9.2::gentoo USE="-bluetooth -dbus -debug -declarative 
>> -designer -examples -gles2 -gui -help -location -multimedia -network -opengl 
>> -positioning -printsupport -sensors -serialport -sql -svg -testlib 
>> -webchannel -webengine -webkit -websockets -widgets -x11extras -xmlpatterns" 
>> PYTHON_TARGETS="python2_7 python3_4 python3_6 -python3_5"
>>
>>   The following REQUIRED_USE flag constraints are unsatisfied:
>> webengine? ( widgets? ( webchannel ) )
>>
>>   The above constraints are a subset of the following complete expression:
>> any-of ( python_targets_python2_7 python_targets_python3_4 
>> python_targets_python3_5 python_targets_python3_6 ) bluetooth? ( gui ) 
>> declarative? ( gui network ) designer? ( widgets ) help? ( gui widgets ) 
>> location? ( positioning ) multimedia? ( gui network ) opengl? ( gui widgets 
>> ) positioning? ( gui ) printsupport? ( gui widgets ) sensors? ( gui ) 
>> serialport? ( gui ) sql? ( widgets ) svg? ( gui widgets ) testlib? ( widgets 
>> ) webchannel? ( network ) webengine? ( network widgets? ( printsupport 
>> webchannel ) ) webkit? ( gui network printsupport widgets ) websockets? ( 
>> network ) widgets? ( gui ) xmlpatterns? ( network )
>>
>> (dependency required by "app-editors/retext-7.0.1-r1::gentoo" [ebuild])
>> (dependency required by "=retext-7.0.1-r1" [argument])
>>
>> Bug: https://bugs.gentoo.org/654782
>> ---
>>  pym/_emerge/depgraph.py|  8 ++--
>>  pym/portage/tests/resolver/test_autounmask.py  | 48 
>> --
>>  pym/portage/tests/resolver/test_slot_collisions.py | 20 +
>>  3 files changed, 61 insertions(+), 15 deletions(-)
>>
>> diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
>> index fbd16ad98..429d8871c 100644
>> --- a/pym/_emerge/depgraph.py
>> +++ b/pym/_emerge/depgraph.py
>> @@ -3009,6 +3009,10 @@ class depgraph(object):
>>  {"myparent" : dep.parent, 
>> "show_req_use" : pkg}))
>>  self._dynamic_config._required_use_unsatisfied 
>> = True
>>  self._dynamic_config._skip_restart = True
>> +# Add pkg to digraph in order to enable 
>> autounmask messages
>> +# for this package, which is useful when 
>> autounmask USE
>> +# changes have violated REQUIRED_USE.
>> +self._dynamic_config.digraph.add(pkg, 
>> dep.parent, priority=priority)
>>  return 0
>>  
>>  if not pkg.onlydeps:
>> @@ -9428,10 +9432,6 @@ class depgraph(object):
>>  return self._dynamic_config._need_config_reload
>>  
>>  def autounmask_breakage_detected(self):
>> -# Check for REQUIRED_USE violations.
>> -for changes in 
>> self._dynamic_config._needed_use_config_changes.values():
>> -if getattr(changes, 'required_use_satisfied', None) is 
>> False:
>> -return True
>>  try:
>>  for pargs, kwargs in 
>> self._dynamic_config._unsatisfied_deps_for_display:
>>  self._show_unsatisfied_dep(
>> diff --git a/pym/portage/tests/resolver/test_autounmask.py 
>> b/pym/portage/tests/resolver/test_autounmask.py
>> index 9042349ea..809d42104 100644
>> --- a/pym/portage/tests/resolver/test_autounmask.py
>> +++ b/pym/portage/tests/resolver/test_autounmask.py
>> @@ -251,15 +251,42 @@ class AutounmaskTestCase(TestCase):
>>  use_changes={ "dev-util/R-1": { "bar": 
>> True } }),
>>  
>>  #Test 

Re: [gentoo-portage-dev] [PATCH] config.environ: always strip slash from SYSROOT (bug 654600)

2018-05-04 Thread Zac Medico
On 05/03/2018 02:30 AM, Brian Dolbec wrote:
> On Wed,  2 May 2018 18:03:38 -0700
> Zac Medico  wrote:
> 
>> Since SYSROOT=/ interacts badly with autotools.eclass (bug 654600),
>> and no EAPI expects SYSROOT to have a trailing slash, always strip
>> the trailing slash from SYSROOT.
>>
>> Bug: https://bugs.gentoo.org/654600
>> Fixes: a41dacf7926c ("Export SYSROOT and ESYSROOT in ebuild env in
>> EAPI 7") ---
>>  pym/portage/package/ebuild/config.py | 9 +++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/pym/portage/package/ebuild/config.py
>> b/pym/portage/package/ebuild/config.py index f9b257b86..96b2ebb71
>> 100644 --- a/pym/portage/package/ebuild/config.py
>> +++ b/pym/portage/package/ebuild/config.py
>> @@ -2813,11 +2813,16 @@ class config(object):
>>  mydict.pop("ECLASSDIR", None)
>>  
>>  if not
>> eapi_attrs.path_variables_end_with_trailing_slash:
>> -for v in ("D", "ED", "ROOT", "EROOT",
>> "SYSROOT", "ESYSROOT",
>> -"BROOT"):
>> +for v in ("D", "ED", "ROOT", "EROOT",
>> "ESYSROOT", "BROOT"): if v in mydict:
>>  mydict[v] =
>> mydict[v].rstrip(os.path.sep) 
>> +# Since SYSROOT=/ interacts badly with
>> autotools.eclass (bug 654600),
>> +# and no EAPI expects SYSROOT to have a trailing
>> slash, always strip
>> +# the trailing slash from SYSROOT.
>> +if 'SYSROOT' in mydict:
>> +mydict['SYSROOT'] =
>> mydict['SYSROOT'].rstrip(os.path.sep) +
>>  try:
>>  builddir = mydict["PORTAGE_BUILDDIR"]
>>  distdir = mydict["DISTDIR"]
> 
> looks good
> 

Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3
-- 
Thanks,
Zac



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-portage-dev] [PATCH] depgraph.autounmask_breakage_detected: ignore REQUIRED_USE violations (bug 654782)

2018-05-04 Thread M. J. Everitt
On 04/05/18 06:22, Zac Medico wrote:
> When autounmask USE changes violate REQUIRED_USE, rather than
> recalculate with autounmask disabled, display the autounmask USE
> changes along with the REQUIRED_USE violation. Adjust unit tests
> to allow for the autounmask USE changes that were previously
> discarded. For the case reported in bug 654782, the output will
> appear as follows:
>
> The following keyword changes are necessary to proceed:
>  (see "package.accept_keywords" in the portage(5) man page for more details)
> # required by =retext-7.0.1-r1 (argument)
> =app-editors/retext-7.0.1-r1 ~amd64
>
> The following USE changes are necessary to proceed:
>  (see "package.use" in the portage(5) man page for more details)
> # required by app-editors/retext-7.0.1-r1::gentoo
> # required by =retext-7.0.1-r1 (argument)
>> =dev-python/PyQt5-5.9.2 printsupport webengine network gui widgets
> !!! The ebuild selected to satisfy 
> "dev-python/PyQt5[gui,network,printsupport,webengine,widgets,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]"
>  has unmet requirements.
> - dev-python/PyQt5-5.9.2::gentoo USE="-bluetooth -dbus -debug -declarative 
> -designer -examples -gles2 -gui -help -location -multimedia -network -opengl 
> -positioning -printsupport -sensors -serialport -sql -svg -testlib 
> -webchannel -webengine -webkit -websockets -widgets -x11extras -xmlpatterns" 
> PYTHON_TARGETS="python2_7 python3_4 python3_6 -python3_5"
>
>   The following REQUIRED_USE flag constraints are unsatisfied:
> webengine? ( widgets? ( webchannel ) )
>
>   The above constraints are a subset of the following complete expression:
> any-of ( python_targets_python2_7 python_targets_python3_4 
> python_targets_python3_5 python_targets_python3_6 ) bluetooth? ( gui ) 
> declarative? ( gui network ) designer? ( widgets ) help? ( gui widgets ) 
> location? ( positioning ) multimedia? ( gui network ) opengl? ( gui widgets ) 
> positioning? ( gui ) printsupport? ( gui widgets ) sensors? ( gui ) 
> serialport? ( gui ) sql? ( widgets ) svg? ( gui widgets ) testlib? ( widgets 
> ) webchannel? ( network ) webengine? ( network widgets? ( printsupport 
> webchannel ) ) webkit? ( gui network printsupport widgets ) websockets? ( 
> network ) widgets? ( gui ) xmlpatterns? ( network )
>
> (dependency required by "app-editors/retext-7.0.1-r1::gentoo" [ebuild])
> (dependency required by "=retext-7.0.1-r1" [argument])
>
> Bug: https://bugs.gentoo.org/654782
> ---
>  pym/_emerge/depgraph.py|  8 ++--
>  pym/portage/tests/resolver/test_autounmask.py  | 48 
> --
>  pym/portage/tests/resolver/test_slot_collisions.py | 20 +
>  3 files changed, 61 insertions(+), 15 deletions(-)
>
> diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
> index fbd16ad98..429d8871c 100644
> --- a/pym/_emerge/depgraph.py
> +++ b/pym/_emerge/depgraph.py
> @@ -3009,6 +3009,10 @@ class depgraph(object):
>   {"myparent" : dep.parent, 
> "show_req_use" : pkg}))
>   self._dynamic_config._required_use_unsatisfied 
> = True
>   self._dynamic_config._skip_restart = True
> + # Add pkg to digraph in order to enable 
> autounmask messages
> + # for this package, which is useful when 
> autounmask USE
> + # changes have violated REQUIRED_USE.
> + self._dynamic_config.digraph.add(pkg, 
> dep.parent, priority=priority)
>   return 0
>  
>   if not pkg.onlydeps:
> @@ -9428,10 +9432,6 @@ class depgraph(object):
>   return self._dynamic_config._need_config_reload
>  
>   def autounmask_breakage_detected(self):
> - # Check for REQUIRED_USE violations.
> - for changes in 
> self._dynamic_config._needed_use_config_changes.values():
> - if getattr(changes, 'required_use_satisfied', None) is 
> False:
> - return True
>   try:
>   for pargs, kwargs in 
> self._dynamic_config._unsatisfied_deps_for_display:
>   self._show_unsatisfied_dep(
> diff --git a/pym/portage/tests/resolver/test_autounmask.py 
> b/pym/portage/tests/resolver/test_autounmask.py
> index 9042349ea..809d42104 100644
> --- a/pym/portage/tests/resolver/test_autounmask.py
> +++ b/pym/portage/tests/resolver/test_autounmask.py
> @@ -251,15 +251,42 @@ class AutounmaskTestCase(TestCase):
>   use_changes={ "dev-util/R-1": { "bar": 
> True } }),
>  
>   #Test interaction with REQUIRED_USE.
> + # Some of these cases trigger USE change(s) 
> that violate
> +