Gentoo Archives: gentoo-commits

From: Alexander Berntsen <bernalex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/, man/
Date: Mon, 04 Jan 2016 10:38:27
Message-Id: 1451903695.51f100e42753d6ffd3a24dfcb2ff8af0aa34966e.bernalex@gentoo
1 commit: 51f100e42753d6ffd3a24dfcb2ff8af0aa34966e
2 Author: Lucian Poston <lucian.poston <AT> gmail <DOT> com>
3 AuthorDate: Sat Jan 2 23:05:28 2016 +0000
4 Commit: Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 4 10:34:55 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=51f100e4
7
8 emerge: Add --autounmask-only parameter (bug 570672)
9
10 The --autounmask-only parameter will display autounmask messages,
11 perform autounmasking (in accordance with the other --autounmask-*
12 parameters), and exit with success (return value 0).
13
14 X-Gentoo-Bug: 570672
15 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=570672
16
17 man/emerge.1 | 6 ++++++
18 pym/_emerge/actions.py | 4 ++++
19 pym/_emerge/main.py | 11 +++++++++++
20 3 files changed, 21 insertions(+)
21
22 diff --git a/man/emerge.1 b/man/emerge.1
23 index c03f044..05b2a01 100644
24 --- a/man/emerge.1
25 +++ b/man/emerge.1
26 @@ -361,6 +361,12 @@ the specified configuration file(s), or enable the
27 \fBEMERGE_DEFAULT_OPTS\fR variable may be used to
28 disable this option by default in \fBmake.conf\fR(5).
29 .TP
30 +.BR "\-\-autounmask\-only [ y | n ]"
31 +Instead of doing any package building, just unmask
32 +packages and generate package.use settings as necessary
33 +to satisfy dependencies. This option is disabled by
34 +default.
35 +.TP
36 .BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]"
37 If \-\-autounmask is enabled, keyword and mask changes
38 using the \'=\' operator will be written. With this
39
40 diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
41 index c3b0b98..59626ad 100644
42 --- a/pym/_emerge/actions.py
43 +++ b/pym/_emerge/actions.py
44 @@ -327,6 +327,10 @@ def action_build(settings, trees, mtimedb,
45 display_missing_pkg_set(root_config, e.value)
46 return 1
47
48 + if "--autounmask-only" in myopts:
49 + mydepgraph.display_problems()
50 + return 0
51 +
52 if not success:
53 mydepgraph.display_problems()
54 return 1
55
56 diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
57 index 5a8b93c..5dbafee 100644
58 --- a/pym/_emerge/main.py
59 +++ b/pym/_emerge/main.py
60 @@ -127,6 +127,7 @@ def insert_optional_args(args):
61 '--alert' : y_or_n,
62 '--ask' : y_or_n,
63 '--autounmask' : y_or_n,
64 + '--autounmask-only' : y_or_n,
65 '--autounmask-keep-masks': y_or_n,
66 '--autounmask-unrestricted-atoms' : y_or_n,
67 '--autounmask-write' : y_or_n,
68 @@ -323,6 +324,11 @@ def parse_opts(tmpcmdline, silent=False):
69 "choices" : true_y_or_n
70 },
71
72 + "--autounmask-only": {
73 + "help" : "only perform --autounmask",
74 + "choices" : true_y_or_n
75 + },
76 +
77 "--autounmask-unrestricted-atoms": {
78 "help" : "write autounmask changes with >= atoms if possible",
79 "choices" : true_y_or_n
80 @@ -745,6 +751,11 @@ def parse_opts(tmpcmdline, silent=False):
81 if myoptions.autounmask in true_y:
82 myoptions.autounmask = True
83
84 + if myoptions.autounmask_only in true_y:
85 + myoptions.autounmask_only = True
86 + else:
87 + myoptions.autounmask_only = None
88 +
89 if myoptions.autounmask_unrestricted_atoms in true_y:
90 myoptions.autounmask_unrestricted_atoms = True