Re: [gentoo-portage-dev] [PATCH] depgraph: account for binpkg-multi-instance in unused warning (bug 619620)
On Mon, 29 May 2017 15:11:41 -0700 Zac Medico wrote: > On Mon, May 29, 2017 at 3:03 PM, Brian Dolbec > wrote: > > > On Sun, 28 May 2017 03:07:50 -0700 > > Zac Medico wrote: > > > > > With FEATURES=binpkg-multi-instance, it is normal to have some > > > unused binary packages, so don't warn if the selected package > > > is the latest version and the most recent build. > > > > >^^^ > > is or isn't the latest version? > > > is the latest version (in this case we "don't warn"). OK, WFM -- Brian Dolbec
Re: [gentoo-portage-dev] [PATCH v2] emerge: warn for --autounmask-continue with --autounmask=n (bug 619612)
On Mon, May 29, 2017 at 3:10 PM, Brian Dolbec wrote: > On Mon, 29 May 2017 14:10:23 -0700 > Zac Medico wrote: > > > In order to avoid possible confusion when the user has specified > > --autounmask-continue and EMERGE_DEFAULT_OPTS contains > > --autounmask=n, display a warning message as follows: > > > > * --autounmask-continue has been disabled by --autounmask=n > > > > X-Gentoo-bug: 619612 > > X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=619612 > > --- > > [PATCH v2] preserves previous behavior where --autounmask=n > > overrides --autounmask-continue, as suggested by Alexander > > Berntsen > > > > pym/_emerge/actions.py | 6 ++ > > pym/portage/tests/emerge/test_simple.py | 5 - > > 2 files changed, 10 insertions(+), 1 deletion(-) > > > > diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py > > index 1bc20c3ed..c8a62fb01 100644 > > --- a/pym/_emerge/actions.py > > +++ b/pym/_emerge/actions.py > > @@ -2862,6 +2862,12 @@ def run_action(emerge_config): > > adjust_configs(emerge_config.opts, emerge_config.trees) > > apply_priorities(emerge_config.target_config.settings) > > > > + if ("--autounmask-continue" in emerge_config.opts and > > + emerge_config.opts.get("--autounmask") == "n"): > > + writemsg_level( > > + " %s --autounmask-continue has been disabled > > by --autounmask=n\n" % > > + warn("*"), level=logging.WARNING, > > noiselevel=-1) + > > for fmt in > > emerge_config.target_config.settings.get("PORTAGE_BINPKG_FORMAT", > > "").split(): if not fmt in portage.const.SUPPORTED_BINPKG_FORMATS: if > > "--pkg-format" in emerge_config.opts: diff --git > > a/pym/portage/tests/emerge/test_simple.py > > b/pym/portage/tests/emerge/test_simple.py index 5930f6cc8..f99c77927 > > 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ > > b/pym/portage/tests/emerge/test_simple.py @@ -311,7 +311,10 @@ > > pkg_preinst() { emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"), > > emerge_cmd + ("-C", "--quiet", "dev-libs/B"), > > > > - emerge_cmd + ("--autounmask-continue", > > "dev-libs/C",), > > + # If EMERGE_DEFAULT_OPTS contains > > --autounmask=n, then --autounmask > > + # must be specified with > > --autounmask-continue. > > + ({"EMERGE_DEFAULT_OPTS" : > > "--autounmask=n"},) + \ > > + emerge_cmd + ("--autounmask", > > "--autounmask-continue", "dev-libs/C",), # Verify that the above > > --autounmask-continue command caused # USE=flag to be applied > > correctly to dev-libs/D. portageq_cmd + ("match", eroot, > > "dev-libs/D[flag]"), > > > WFM > Thanks, pushed: https://gitweb.gentoo.org/proj/portage.git/commit/?id=565ceb1bebc83ec1a5572a672e2e08ea7d91e7a8 -- Thanks, Zac
Re: [gentoo-portage-dev] [PATCH] depgraph: account for binpkg-multi-instance in unused warning (bug 619620)
On Mon, May 29, 2017 at 3:03 PM, Brian Dolbec wrote: > On Sun, 28 May 2017 03:07:50 -0700 > Zac Medico wrote: > > > With FEATURES=binpkg-multi-instance, it is normal to have some > > unused binary packages, so don't warn if the selected package > > is the latest version and the most recent build. > > >^^^ > is or isn't the latest version? is the latest version (in this case we "don't warn"). -- Thanks, Zac
Re: [gentoo-portage-dev] [PATCH v2] emerge: warn for --autounmask-continue with --autounmask=n (bug 619612)
On Mon, 29 May 2017 14:10:23 -0700 Zac Medico wrote: > In order to avoid possible confusion when the user has specified > --autounmask-continue and EMERGE_DEFAULT_OPTS contains > --autounmask=n, display a warning message as follows: > > * --autounmask-continue has been disabled by --autounmask=n > > X-Gentoo-bug: 619612 > X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=619612 > --- > [PATCH v2] preserves previous behavior where --autounmask=n > overrides --autounmask-continue, as suggested by Alexander > Berntsen > > pym/_emerge/actions.py | 6 ++ > pym/portage/tests/emerge/test_simple.py | 5 - > 2 files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py > index 1bc20c3ed..c8a62fb01 100644 > --- a/pym/_emerge/actions.py > +++ b/pym/_emerge/actions.py > @@ -2862,6 +2862,12 @@ def run_action(emerge_config): > adjust_configs(emerge_config.opts, emerge_config.trees) > apply_priorities(emerge_config.target_config.settings) > > + if ("--autounmask-continue" in emerge_config.opts and > + emerge_config.opts.get("--autounmask") == "n"): > + writemsg_level( > + " %s --autounmask-continue has been disabled > by --autounmask=n\n" % > + warn("*"), level=logging.WARNING, > noiselevel=-1) + > for fmt in > emerge_config.target_config.settings.get("PORTAGE_BINPKG_FORMAT", > "").split(): if not fmt in portage.const.SUPPORTED_BINPKG_FORMATS: if > "--pkg-format" in emerge_config.opts: diff --git > a/pym/portage/tests/emerge/test_simple.py > b/pym/portage/tests/emerge/test_simple.py index 5930f6cc8..f99c77927 > 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ > b/pym/portage/tests/emerge/test_simple.py @@ -311,7 +311,10 @@ > pkg_preinst() { emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"), > emerge_cmd + ("-C", "--quiet", "dev-libs/B"), > > - emerge_cmd + ("--autounmask-continue", > "dev-libs/C",), > + # If EMERGE_DEFAULT_OPTS contains > --autounmask=n, then --autounmask > + # must be specified with > --autounmask-continue. > + ({"EMERGE_DEFAULT_OPTS" : > "--autounmask=n"},) + \ > + emerge_cmd + ("--autounmask", > "--autounmask-continue", "dev-libs/C",), # Verify that the above > --autounmask-continue command caused # USE=flag to be applied > correctly to dev-libs/D. portageq_cmd + ("match", eroot, > "dev-libs/D[flag]"), WFM -- Brian Dolbec
Re: [gentoo-portage-dev] [PATCH] depgraph: make --autounmask-continue imply --autounmask
On Mon, 29 May 2017 08:27:11 -0700 Zac Medico wrote: > On Mon, May 29, 2017 at 4:03 AM, Alexander Berntsen > wrote: > > > Looks OK. Although I'm not a fan of the proposed change. Changes > > like these make scripts a tiny bit more tedious. If you have a > > bunch of --autounmask stuff in your script, you can now just do > > --autounmask=n and turn it all off. This means you'll have to turn > > off more stuff. And --autounmask-continue is supposed to be used > > "with great care" anyway, so I think it's fine to demand users to > > write --autounmask too. > > Yeah, we can go the other way and make --autounmask=n trigger a > warning message when --autounmask-continue is also in the options. My > main goal is to prevent confusion in this case. Yeah, I prefer this over --autounmask-coninue automatically setting autunmask to True. -- Brian Dolbec
Re: [gentoo-portage-dev] [PATCH v2] man/portage.5: document -* in profile "packages" files (bug 610670)
On Sun, 28 May 2017 13:15:12 -0700 Zac Medico wrote: > The -* wildcard has been supported since portage-2.3.4, but it was > not explicitly documented. > > X-Gentoo-Bug: 610670 > X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=610670 > --- > [PATCH v2] clarifies that -* discards @system and @profile > packages as suggested by Martin Vaeth. > > man/portage.5 | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/man/portage.5 b/man/portage.5 > index 82e979ecf..366a1fa85 100644 > --- a/man/portage.5 > +++ b/man/portage.5 > @@ -369,7 +369,8 @@ hurt \fBemerge\fR's ability to parallelize. > .I Note: > In a cascading profile setup, you can remove packages in children > profiles which were added by parent profiles by prefixing the atom > with -a '\-'. > +a '\-'. The '\-*' wildcard discards all @system and @profile packages > +added by parent profiles. > > .I Example: > .nf LGTM -- Brian Dolbec
Re: [gentoo-portage-dev] [PATCH] depgraph: account for binpkg-multi-instance in unused warning (bug 619620)
On Sun, 28 May 2017 03:07:50 -0700 Zac Medico wrote: > With FEATURES=binpkg-multi-instance, it is normal to have some > unused binary packages, so don't warn if the selected package > is the latest version and the most recent build. > ^^^ is or isn't the latest version? > X-Gentoo-bug: 619620 > X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=619620 > --- > pym/_emerge/depgraph.py | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py > index 726835dd4..2dc432431 100644 > --- a/pym/_emerge/depgraph.py > +++ b/pym/_emerge/depgraph.py > @@ -876,6 +876,15 @@ class depgraph(object): > > self._dynamic_config.ignored_binaries.pop(pkg) > break > > + # NOTE: The Package.__ge__ > implementation accounts for > + # differences in build_time, so the > warning about "ignored" > + # packages will be triggered if both > packages are the same > + # version and selected_pkg is not > the most recent build. > + if (selected_pkg.type_name == > "binary" and > + selected_pkg >= pkg): > + > self._dynamic_config.ignored_binaries.pop(pkg) > + break > + > if selected_pkg.installed and \ > selected_pkg.cpv == pkg.cpv > and \ selected_pkg.build_time == pkg.build_time: -- Brian Dolbec
[gentoo-portage-dev] [PATCH v2] emerge: warn for --autounmask-continue with --autounmask=n (bug 619612)
In order to avoid possible confusion when the user has specified --autounmask-continue and EMERGE_DEFAULT_OPTS contains --autounmask=n, display a warning message as follows: * --autounmask-continue has been disabled by --autounmask=n X-Gentoo-bug: 619612 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=619612 --- [PATCH v2] preserves previous behavior where --autounmask=n overrides --autounmask-continue, as suggested by Alexander Berntsen pym/_emerge/actions.py | 6 ++ pym/portage/tests/emerge/test_simple.py | 5 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 1bc20c3ed..c8a62fb01 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2862,6 +2862,12 @@ def run_action(emerge_config): adjust_configs(emerge_config.opts, emerge_config.trees) apply_priorities(emerge_config.target_config.settings) + if ("--autounmask-continue" in emerge_config.opts and + emerge_config.opts.get("--autounmask") == "n"): + writemsg_level( + " %s --autounmask-continue has been disabled by --autounmask=n\n" % + warn("*"), level=logging.WARNING, noiselevel=-1) + for fmt in emerge_config.target_config.settings.get("PORTAGE_BINPKG_FORMAT", "").split(): if not fmt in portage.const.SUPPORTED_BINPKG_FORMATS: if "--pkg-format" in emerge_config.opts: diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py index 5930f6cc8..f99c77927 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ b/pym/portage/tests/emerge/test_simple.py @@ -311,7 +311,10 @@ pkg_preinst() { emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"), emerge_cmd + ("-C", "--quiet", "dev-libs/B"), - emerge_cmd + ("--autounmask-continue", "dev-libs/C",), + # If EMERGE_DEFAULT_OPTS contains --autounmask=n, then --autounmask + # must be specified with --autounmask-continue. + ({"EMERGE_DEFAULT_OPTS" : "--autounmask=n"},) + \ + emerge_cmd + ("--autounmask", "--autounmask-continue", "dev-libs/C",), # Verify that the above --autounmask-continue command caused # USE=flag to be applied correctly to dev-libs/D. portageq_cmd + ("match", eroot, "dev-libs/D[flag]"), -- 2.13.0
Re: [gentoo-portage-dev] [PATCH] depgraph: make --autounmask-continue imply --autounmask
On Mon, May 29, 2017 at 4:03 AM, Alexander Berntsen wrote: > Looks OK. Although I'm not a fan of the proposed change. Changes like > these make scripts a tiny bit more tedious. If you have a bunch of > --autounmask stuff in your script, you can now just do --autounmask=n > and turn it all off. This means you'll have to turn off more stuff. And > --autounmask-continue is supposed to be used "with great care" anyway, > so I think it's fine to demand users to write --autounmask too. > Yeah, we can go the other way and make --autounmask=n trigger a warning message when --autounmask-continue is also in the options. My main goal is to prevent confusion in this case. -- Thanks, Zac
Re: [gentoo-portage-dev] [PATCH] depgraph: make --autounmask-continue imply --autounmask
Looks OK. Although I'm not a fan of the proposed change. Changes like these make scripts a tiny bit more tedious. If you have a bunch of --autounmask stuff in your script, you can now just do --autounmask=n and turn it all off. This means you'll have to turn off more stuff. And --autounmask-continue is supposed to be used "with great care" anyway, so I think it's fine to demand users to write --autounmask too. -- Alexander berna...@gentoo.org https://secure.plaimi.net/~alexander signature.asc Description: OpenPGP digital signature