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