summaryrefslogtreecommitdiffstats
path: root/pym/_emerge
diff options
context:
space:
mode:
Diffstat (limited to 'pym/_emerge')
-rw-r--r--pym/_emerge/depgraph.py4
-rw-r--r--pym/_emerge/help.py8
-rw-r--r--pym/_emerge/main.py10
3 files changed, 21 insertions, 1 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index a5015b8e6..52d454555 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -3411,6 +3411,8 @@ class depgraph(object):
default_selection = (pkg, existing)
+ autounmask_keep_masks = self._frozen_config.myopts.get("--autounmask-keep-masks", "n") != "n"
+
if self._dynamic_config._autounmask is True:
if pkg is not None and \
pkg.installed and \
@@ -3422,7 +3424,7 @@ class depgraph(object):
break
for allow_unmasks in (False, True):
- if only_use_changes and allow_unmasks:
+ if allow_unmasks and (only_use_changes or autounmask_keep_masks):
continue
if pkg is not None:
diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py
index f5ff7a367..4334bcbdb 100644
--- a/pym/_emerge/help.py
+++ b/pym/_emerge/help.py
@@ -331,6 +331,14 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
+ print(" " + green("--autounmask-keep-masks") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
+ desc = "If --autounmask is enabled, no changes to " + \
+ "package.unmask will be created. This leads to unsatisfied " + \
+ "dependencies if no other solution exists."
+ for line in wrap(desc, desc_width):
+ print(desc_indent + line)
+ print()
print(" " + green("--autounmask-write") + " [ %s | %s ]" % \
(turquoise("y"), turquoise("n")))
desc = "If --autounmask is enabled, changes are written " + \
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 73d07953e..3f47af789 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -431,6 +431,7 @@ def insert_optional_args(args):
default_arg_opts = {
'--ask' : y_or_n,
'--autounmask' : y_or_n,
+ '--autounmask-keep-masks': y_or_n,
'--autounmask-unrestricted-atoms' : y_or_n,
'--autounmask-write' : y_or_n,
'--buildpkg' : y_or_n,
@@ -610,6 +611,12 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n
},
+ "--autounmask-keep-masks": {
+ "help" : "don't add package.unmask entries",
+ "type" : "choice",
+ "choices" : true_y_or_n
+ },
+
"--autounmask-write": {
"help" : "write changes made by --autounmask to disk",
"type" : "choice",
@@ -936,6 +943,9 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.autounmask_unrestricted_atoms in true_y:
myoptions.autounmask_unrestricted_atoms = True
+ if myoptions.autounmask_keep_masks in true_y:
+ myoptions.autounmask_keep_masks = True
+
if myoptions.autounmask_write in true_y:
myoptions.autounmask_write = True