sys.stdout.write("\b\b "+spinner[spinpos])
sys.stdout.flush()
+def update_quiet_spinner():
+ return
+
spinpos = 0
spinner = "/-\\|/-\\|/-\\|/-\\|\\-/|\\-/|\\-/|\\-/|"
update_spinner = update_twirl_spinner
params=["selective", "deep", "self", "recurse", "empty"]
actions=[
"clean", "config", "depclean",
-"info", "inject", "metadata",
+"info", "inject", "metadata",
"prune", "regen", "rsync", "search",
"sync", "system", "unmerge", "world",
]
options=[
"--ask",
"--buildpkg", "--buildpkgonly",
-"--changelog", "--columns",
+"--changelog", "--columns", "--cols",
"--debug", "--deep",
"--digest",
"--emptytree",
#tmpcmdline.extend(portage.settings["EMERGE_OPTS"].split())
cmdline=[]
for x in tmpcmdline:
- if x[0:1]=="-"and x[1:2]!="-":
+ if x[0:1]=="-" and x[1:2]!="-":
for y in x[1:]:
if shortmapping.has_key(y):
if shortmapping[y] in cmdline:
if not x:
continue
if len(x)>=2 and x[0:2]=="--":
+ if x == "--cols":
+ x = "--columns"
if x in options:
myopts.append(x)
elif x[2:] in actions:
if "moo" in myfiles:
print """
- Gentoo (""" + os.uname()[0] + """)
+ Larry loves Gentoo (""" + os.uname()[0] + """)
_______________________
< Have you mooed today? >
print "emerge: can't specify both of \"--tree\" and \"--columns\"."
sys.exit(1)
+if ("--quiet" in myopts):
+ update_spinner = update_quiet_spinner
+
# Always create packages if FEATURES=buildpkg
# Imply --buildpkg if --buildpkgonly
if ("buildpkg" in portage.features) or ("--buildpkgonly" in myopts):
print "="+string.join(sp_absx[sp_vdb_len:],"/")
candidate_catpkgs.append("="+string.join(sp_absx[sp_vdb_len:],"/"))
- if ("--pretend" in myopts) or ("--ask" in myopts):
+ if (("--pretend" in myopts) or ("--ask" in myopts)) and not ("--quiet" in myopts):
print darkgreen("\n>>> These are the packages that I would unmerge:")
pkgmap={}
emergelog(" >>> depclean")
mydepgraph=depgraph(myaction,myopts)
- print "\nCalculating dependencies ",
+ if not ("--quiet" in myopts):
+ print "\nCalculating dependencies ",
if not mydepgraph.xcreate("world"):
print "\n!!! Failed to create deptree."
sys.exit(1)
- print "\b\b ... done!"
+ if not ("--quiet" in myopts):
+ print "\b\b ... done!"
if ("--usepkgonly" in myopts) and mydepgraph.missingbins:
sys.stderr.write(red("The following binaries are not available for merging...\n"))
else:
favorites=[]
syslist=getlist("system")
- if (("--pretend" in myopts) and not ("--fetchonly" in myopts or "--fetch-all-uri" in myopts)) or ("--ask" in myopts):
+ if ((("--pretend" in myopts) and not ("--fetchonly" in myopts or "--fetch-all-uri" in myopts)) or ("--ask" in myopts)) and not ("--quiet" in myopts):
if "--tree" in myopts:
print
print darkgreen("These are the packages that I would merge, in reverse order:")
mydepgraph=depgraph(myaction,myopts)
if myaction in ["system","world"]:
- print "Calculating",myaction,"dependencies ",
- sys.stdout.flush()
+ if not ("--quiet" in myopts):
+ print "Calculating",myaction,"dependencies ",
+ sys.stdout.flush()
if not mydepgraph.xcreate(myaction):
print "!!! Depgraph creation failed."
sys.exit(1)
- print "\b\b ...done!"
+ if not ("--quiet" in myopts):
+ print "\b\b ...done!"
else:
if not myfiles:
print "emerge: please tell me what to do."
help()
sys.exit(1)
#we don't have any files to process; skip this step and exit
- print "Calculating dependencies ",
- sys.stdout.flush()
+ if not ("--quiet" in myopts):
+ print "Calculating dependencies ",
+ sys.stdout.flush()
retval,favorites=mydepgraph.select_files(myfiles)
if not retval:
sys.exit(1)
- print "\b\b ...done!"
+ if not ("--quiet" in myopts):
+ print "\b\b ...done!"
if ("--usepkgonly" in myopts) and mydepgraph.missingbins:
sys.stderr.write(red("The following binaries are not available for merging...\n"))