summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r--pym/_emerge/main.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 71872112..8e69ad05 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -510,6 +510,15 @@ def parse_opts(tmpcmdline, silent=False):
"help":"temporarily override ACCEPT_PROPERTIES",
"action":"store"
},
+
+ "--backtrack": {
+
+ "help" : "Specifies how many times to backtrack if dependency " + \
+ "calculation fails ",
+
+ "action" : "store"
+ },
+
"--config-root": {
"help":"specify the location for portage configuration files",
"action":"store"
@@ -731,6 +740,21 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.selective == "True":
myoptions.selective = True
+ if myoptions.backtrack is not None:
+
+ try:
+ backtrack = int(myoptions.backtrack)
+ except (OverflowError, ValueError):
+ backtrack = -1
+
+ if backtrack < 0:
+ backtrack = None
+ if not silent:
+ writemsg("!!! Invalid --backtrack parameter: '%s'\n" % \
+ (myoptions.backtrack,), noiselevel=-1)
+
+ myoptions.backtrack = backtrack
+
if myoptions.deep is not None:
deep = None
if myoptions.deep == "True":