Re: [gentoo-portage-dev] [PATCH] depgraph.autounmask_breakage_detected: ignore REQUIRED_USE violations (bug 654782)
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] depgraph.autounmask_breakage_detected: ignore REQUIRED_USE violations (bug 654782)
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 > +
[gentoo-portage-dev] [PATCH] depgraph.autounmask_breakage_detected: ignore REQUIRED_USE violations (bug 654782)
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 + # REQUIRED_USE, so the USE changes are shown along with + # the REQUIRED_USE violation that they would trigger. + +