myelogstr+=" "+string.join(myfiles, " ")
emergelog(" *** emerge "+myelogstr)
-#configure emerge engine parameters
-#
-# self: include _this_ package regardless of if it is merged.
-# selective: exclude the package if it is merged
-# recurse: go into the dependencies
-# empty: pretend nothing is merged
-myparams=["self","recurse"]
-add=[]
-sub=[]
-if "--update" in myopts or myaction in ("system", "world"):
- add.extend(["selective","empty"])
-if "--emptytree" in myopts:
- add.extend(["empty"])
- sub.extend(["selective"])
-if "--nodeps" in myopts:
- sub.extend(["recurse"])
-if "--noreplace" in myopts:
- add.extend(["selective"])
-if "--deep" in myopts:
- add.extend(["deep"])
-if "--selective" in myopts:
- add.extend(["selective"])
-if myaction in ["world","system"]:
- add.extend(["selective"])
-elif myaction in ["depclean"]:
- add.extend(["empty"])
- sub.extend(["selective"])
-for x in add:
- if (x not in myparams) and (x not in sub):
- myparams.append(x)
-for x in sub:
- if x in myparams:
- myparams.remove(x)
+def create_depgraph_params(myopts, myaction):
+ #configure emerge engine parameters
+ #
+ # self: include _this_ package regardless of if it is merged.
+ # selective: exclude the package if it is merged
+ # recurse: go into the dependencies
+ # empty: pretend nothing is merged
+ myparams=["self","recurse"]
+ add=[]
+ sub=[]
+ if "--update" in myopts or myaction in ("system", "world"):
+ add.extend(["selective","empty"])
+ if "--emptytree" in myopts:
+ add.extend(["empty"])
+ sub.extend(["selective"])
+ if "--nodeps" in myopts:
+ sub.extend(["recurse"])
+ if "--noreplace" in myopts:
+ add.extend(["selective"])
+ if "--deep" in myopts:
+ add.extend(["deep"])
+ if "--selective" in myopts:
+ add.extend(["selective"])
+ if myaction in ["world","system"]:
+ add.extend(["selective"])
+ elif myaction in ["depclean"]:
+ add.extend(["empty"])
+ sub.extend(["selective"])
+ for x in add:
+ if (x not in myparams) and (x not in sub):
+ myparams.append(x)
+ for x in sub:
+ if x in myparams:
+ myparams.remove(x)
+ return myparams
# search functionality
class search:
if not "--pretend" in myopts: #just check pretend, since --ask implies pretend
emergelog(" >>> depclean")
-
+
+ myparams = create_depgraph_params(myopts, myaction)
mydepgraph = depgraph(portage.settings, portage.portdb, portage.db,
myaction, myopts, myparams, edebug, spinner)
if myopt not in myresumeopts:
myresumeopts.append(myopt)
myopts=myresumeopts
+ myparams = create_depgraph_params(myopts, myaction)
mydepgraph = depgraph(portage.settings, portage.portdb, portage.db,
"resume", myopts, myparams, edebug, spinner)
if "--resume" not in myopts:
print darkgreen("emerge: It seems we have nothing to resume...")
sys.exit(0)
+ myparams = create_depgraph_params(myopts, myaction)
mydepgraph = depgraph(portage.settings, portage.portdb, portage.db,
myaction, myopts, myparams, edebug, spinner)
if myaction in ["system","world"]: