From: Lucian Poston <lucian.poston@gmail.com>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Lucian Poston <lucian.poston@gmail.com>
Subject: [gentoo-portage-dev] [PATCH] emerge: Add --autounmask-only parameter
Date: Wed, 23 Dec 2015 13:39:32 -0800 [thread overview]
Message-ID: <1450906772-14853-1-git-send-email-lucian.poston@gmail.com> (raw)
The --autounmask-only parameter will display autounmask messages,
perform autounmasking (in accordance with the other --autounmask-*
parameters), and exit with success (return value 0).
---
man/emerge.1 | 6 ++++++
pym/_emerge/actions.py | 4 ++++
pym/_emerge/depgraph.py | 4 ++--
pym/_emerge/main.py | 11 +++++++++++
4 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/man/emerge.1 b/man/emerge.1
index c03f044..05b2a01 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -361,6 +361,12 @@ the specified configuration file(s), or enable the
\fBEMERGE_DEFAULT_OPTS\fR variable may be used to
disable this option by default in \fBmake.conf\fR(5).
.TP
+.BR "\-\-autounmask\-only [ y | n ]"
+Instead of doing any package building, just unmask
+packages and generate package.use settings as necessary
+to satisfy dependencies. This option is disabled by
+default.
+.TP
.BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]"
If \-\-autounmask is enabled, keyword and mask changes
using the \'=\' operator will be written. With this
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index a080ba4..5004fd1 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -327,6 +327,10 @@ def action_build(settings, trees, mtimedb,
display_missing_pkg_set(root_config, e.value)
return 1
+ if "--autounmask-only" in myopts:
+ mydepgraph.display_autounmask()
+ return 0
+
if not success:
mydepgraph.display_problems()
return 1
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 2169b00..6984f06 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -7972,7 +7972,7 @@ class depgraph(object):
return display(self, mylist, favorites, verbosity)
- def _display_autounmask(self):
+ def display_autounmask(self):
"""
Display --autounmask message and optionally write it to config files
(using CONFIG_PROTECT). The message includes the comments and the changes.
@@ -8395,7 +8395,7 @@ class depgraph(object):
self._show_ignored_binaries()
- self._display_autounmask()
+ self.display_autounmask()
for depgraph_sets in self._dynamic_config.sets.values():
for pset in depgraph_sets.sets.values():
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 5a8b93c..5dbafee 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -127,6 +127,7 @@ def insert_optional_args(args):
'--alert' : y_or_n,
'--ask' : y_or_n,
'--autounmask' : y_or_n,
+ '--autounmask-only' : y_or_n,
'--autounmask-keep-masks': y_or_n,
'--autounmask-unrestricted-atoms' : y_or_n,
'--autounmask-write' : y_or_n,
@@ -323,6 +324,11 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n
},
+ "--autounmask-only": {
+ "help" : "only perform --autounmask",
+ "choices" : true_y_or_n
+ },
+
"--autounmask-unrestricted-atoms": {
"help" : "write autounmask changes with >= atoms if possible",
"choices" : true_y_or_n
@@ -745,6 +751,11 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.autounmask in true_y:
myoptions.autounmask = True
+ if myoptions.autounmask_only in true_y:
+ myoptions.autounmask_only = True
+ else:
+ myoptions.autounmask_only = None
+
if myoptions.autounmask_unrestricted_atoms in true_y:
myoptions.autounmask_unrestricted_atoms = True
--
2.4.10
next reply other threads:[~2015-12-23 21:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 21:39 Lucian Poston [this message]
2015-12-24 1:58 ` [gentoo-portage-dev] [PATCH] emerge: Add --autounmask-only parameter Zac Medico
2015-12-24 3:18 ` Lucian Poston
2015-12-24 14:38 ` [gentoo-portage-dev] [PATCH v2] " Lucian Poston
2015-12-25 20:46 ` Zac Medico
2015-12-25 22:31 ` Brian Dolbec
2015-12-29 10:45 ` Alexander Berntsen
2015-12-29 10:48 ` Alexander Berntsen
2016-01-02 23:05 ` [gentoo-portage-dev] [PATCH v3] emerge: Add --autounmask-only parameter (bug 570672) Lucian Poston
2016-01-04 10:38 ` [gentoo-portage-dev] " Alexander Berntsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450906772-14853-1-git-send-email-lucian.poston@gmail.com \
--to=lucian.poston@gmail.com \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox