1 |
On Mon, 29 May 2017 14:10:23 -0700 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> In order to avoid possible confusion when the user has specified |
5 |
> --autounmask-continue and EMERGE_DEFAULT_OPTS contains |
6 |
> --autounmask=n, display a warning message as follows: |
7 |
> |
8 |
> * --autounmask-continue has been disabled by --autounmask=n |
9 |
> |
10 |
> X-Gentoo-bug: 619612 |
11 |
> X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=619612 |
12 |
> --- |
13 |
> [PATCH v2] preserves previous behavior where --autounmask=n |
14 |
> overrides --autounmask-continue, as suggested by Alexander |
15 |
> Berntsen |
16 |
> |
17 |
> pym/_emerge/actions.py | 6 ++++++ |
18 |
> pym/portage/tests/emerge/test_simple.py | 5 ++++- |
19 |
> 2 files changed, 10 insertions(+), 1 deletion(-) |
20 |
> |
21 |
> diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py |
22 |
> index 1bc20c3ed..c8a62fb01 100644 |
23 |
> --- a/pym/_emerge/actions.py |
24 |
> +++ b/pym/_emerge/actions.py |
25 |
> @@ -2862,6 +2862,12 @@ def run_action(emerge_config): |
26 |
> adjust_configs(emerge_config.opts, emerge_config.trees) |
27 |
> apply_priorities(emerge_config.target_config.settings) |
28 |
> |
29 |
> + if ("--autounmask-continue" in emerge_config.opts and |
30 |
> + emerge_config.opts.get("--autounmask") == "n"): |
31 |
> + writemsg_level( |
32 |
> + " %s --autounmask-continue has been disabled |
33 |
> by --autounmask=n\n" % |
34 |
> + warn("*"), level=logging.WARNING, |
35 |
> noiselevel=-1) + |
36 |
> for fmt in |
37 |
> emerge_config.target_config.settings.get("PORTAGE_BINPKG_FORMAT", |
38 |
> "").split(): if not fmt in portage.const.SUPPORTED_BINPKG_FORMATS: if |
39 |
> "--pkg-format" in emerge_config.opts: diff --git |
40 |
> a/pym/portage/tests/emerge/test_simple.py |
41 |
> b/pym/portage/tests/emerge/test_simple.py index 5930f6cc8..f99c77927 |
42 |
> 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ |
43 |
> b/pym/portage/tests/emerge/test_simple.py @@ -311,7 +311,10 @@ |
44 |
> pkg_preinst() { emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"), |
45 |
> emerge_cmd + ("-C", "--quiet", "dev-libs/B"), |
46 |
> |
47 |
> - emerge_cmd + ("--autounmask-continue", |
48 |
> "dev-libs/C",), |
49 |
> + # If EMERGE_DEFAULT_OPTS contains |
50 |
> --autounmask=n, then --autounmask |
51 |
> + # must be specified with |
52 |
> --autounmask-continue. |
53 |
> + ({"EMERGE_DEFAULT_OPTS" : |
54 |
> "--autounmask=n"},) + \ |
55 |
> + emerge_cmd + ("--autounmask", |
56 |
> "--autounmask-continue", "dev-libs/C",), # Verify that the above |
57 |
> --autounmask-continue command caused # USE=flag to be applied |
58 |
> correctly to dev-libs/D. portageq_cmd + ("match", eroot, |
59 |
> "dev-libs/D[flag]"), |
60 |
|
61 |
|
62 |
WFM |
63 |
-- |
64 |
Brian Dolbec <dolsen> |