Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 16797 Details for
Bug 2365
Standardise Portage (emerge) CLI options
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for emerge itself.
emerge-long-options.patch (text/plain), 18.93 KB, created by
Alexander Winston
on 2003-08-29 22:18:33 UTC
(
hide
)
Description:
Patch for emerge itself.
Filename:
MIME Type:
Creator:
Alexander Winston
Created:
2003-08-29 22:18:33 UTC
Size:
18.93 KB
patch
obsolete
>--- emerge 2003-08-27 02:05:35.000000000 -0400 >+++ emerge.new 2003-08-27 04:03:44.000000000 -0400 >@@ -39,41 +39,41 @@ > "regen", "rsync", "search", "sync", "system", "unmerge", "world" > ] > options=[ >-"--buildpkg", "--buildpkgonly", >+"--build-package", "--build-package-only", > "--changelog", "--columns", > "--debug", "--deep", > "--digest", >-"--emptytree", "--fetchonly", >-"--getbinpkg", "--getbinpkgonly", >-"--help", "--noconfmem", >-"--nodeps", "--noreplace", >-"--nospinner", "--oneshot", >-"--onlydeps", "--pretend", >+"--empty-tree", "--fetch-only", >+"--get-binary-package", "--get-binary-package-only", >+"--help", "--forget-configuration", >+"--no-dependencies", "--no-replace", >+"--no-spinner", "--once-only", >+"--dependencies-only", "--pretend", > "--quiet", "--resume", >-"--searchdesc", "--selective", >-"--skipfirst", >-"--update", "--upgradeonly", >-"--usepkg", "--usepkgonly", >+"--search-description", "--selective", >+"--skip-first", >+"--update", "--upgrade-only", >+"--use-package", "--use-package-only", > "--verbose", "--version" > ] > > shortmapping={ >-"b":"--buildpkg", "B":"--buildpkgonly", >+"b":"--build-package", "B":"--build-package-only", > "c":"--clean", "C":"--unmerge", > "d":"--debug", "D":"--deep", >-"e":"--emptytree", >-"f":"--fetchonly", >-"g":"--getbinpkg", "G":"--getbinpkgonly", >+"e":"--empty-tree", >+"f":"--fetch-only", >+"g":"--get-binary-package", "G":"--get-binary-package-only", > "h":"--help", > "i":"--inject", >-"k":"--usepkg", "K":"--usepkgonly", >+"k":"--use-package", "K":"--use-package-only", > "l":"--changelog", >-"n":"--noreplace", >-"o":"--onlydeps", "O":"--nodeps", >+"n":"--no-replace", >+"o":"--dependencies-only", "O":"--no-dependencies", > "p":"--pretend", "P":"--prune", > "q":"--quiet", >-"s":"--search", "S":"--searchdesc", >-"u":"--update", "U":"--upgradeonly", >+"s":"--search", "S":"--search-description", >+"u":"--update", "U":"--upgrade-only", > "v":"--verbose", "V":"--version" > } > >@@ -153,31 +153,31 @@ > sys.exit(1) > > # Always create packages if FEATURES=buildpkg >-# Imply --buildpkg if --buildpkgonly >-if ("buildpkg" in portage.features) or ("--buildpkgonly" in myopts): >- if "--buildpkg" not in myopts: >- myopts.append("--buildpkg") >+# Imply --build-package if --build-package-only >+if ("buildpkg" in portage.features) or ("--build-package-only" in myopts): >+ if "--build-package" not in myopts: >+ myopts.append("--build-package") > > # Also allow -S to invoke search action (-sS) >-if ("--searchdesc" in myopts) and (not myaction): >+if ("--search-description" in myopts) and (not myaction): > myaction = "search" > >-if ("--getbinpkgonly" in myopts) and not ("--usepkgonly" in myopts): >- myopts.append("--usepkgonly") >+if ("--get-binary-package-only" in myopts) and not ("--use-package-only" in myopts): >+ myopts.append("--use-package-only") > >-if ("--getbinpkgonly" in myopts) and not ("--getbinpkg" in myopts): >- myopts.append("--getbinpkg") >+if ("--get-binary-package-only" in myopts) and not ("--get-binary-package" in myopts): >+ myopts.append("--get-binary-package") > >-if ("--getbinpkg" in myopts) and not ("--usepkg" in myopts): >- myopts.append("--usepkg") >+if ("--get-binary-package" in myopts) and not ("--use-package" in myopts): >+ myopts.append("--use-package") > >-# Also allow -K to apply --usepkg/-k >-if ("--usepkgonly" in myopts) and not ("--usepkg" in myopts): >- myopts.append("--usepkg") >+# Also allow -K to apply --use-package/-k >+if ("--use-package-only" in myopts) and not ("--use-package" in myopts): >+ myopts.append("--use-package") > > # Also allow -U to apply --update/-u >-if ("--upgradeonly" in myopts) and not ("--update" in myopts): >- print ">>> --upgradeonly implies --update... adding --update to options." >+if ("--upgrade-only" in myopts) and not ("--update" in myopts): >+ print ">>> --upgrade-only implies --update... adding --update to options." > myopts.append("--update") > > # Also allow -l to apply --pretend/-p >@@ -186,7 +186,7 @@ > myopts.append("--pretend") > > # Set so that configs will be merged regardless of remembered status >-if ("--noconfmem" in myopts): >+if ("--forget-configuration" in myopts): > portage.settings["NOCONFMEM"]="1" > > # Set various debug markers... They should be merged somehow. >@@ -317,12 +317,12 @@ > sub=[] > if "--update" in myopts: > add.extend(["selective","empty"]) >-if "--emptytree" in myopts: >+if "--empty-tree" in myopts: > add.extend(["empty"]) > sub.extend(["selective"]) >-if "--nodeps" in myopts: >+if "--no-dependencies" in myopts: > sub.extend(["recurse"]) >-if "--noreplace" in myopts: >+if "--no-replace" in myopts: > add.extend(["selective"]) > if "--deep" in myopts: > add.extend(["deep"]) >@@ -342,7 +342,7 @@ > > def update_spinner(): > global spinner, spinpos >- if sys.stdout.isatty() and not ("--nospinner" in myopts): >+ if sys.stdout.isatty() and not ("--no-spinner" in myopts): > sys.stdout.write("\b"+spinner[spinpos]) > spinpos=(spinpos+1)%8 > sys.stdout.flush() >@@ -370,7 +370,7 @@ > global myopts > self.searchkey=searchkey > self.packagematches = [] >- if "--searchdesc" in myopts: >+ if "--search-description" in myopts: > self.searchdesc=1 > self.matches = {"pkg":[], "desc":[]} > else: >@@ -563,9 +563,9 @@ > else: > self.mydbapi[portage.root]=portage.db[portage.root]["vartree"].dbapi > >- if "--usepkg" in myopts: >+ if "--use-package" in myopts: > try: >- portage.db["/"]["bintree"].populate(("--getbinpkg" in myopts), ("--getbinpkgonly" in myopts)) >+ portage.db["/"]["bintree"].populate(("--get-binary-package" in myopts), ("--get-binary-package-only" in myopts)) > except ValueError, e: > sys.stderr.write(red("!!! Failed to get all metadata: "+str(e)+"\n")) > sys.exit(1) >@@ -573,7 +573,7 @@ > def create(self,mybigkey,myparent=None,addme=1): > """creates the actual digraph of packages to merge. return 1 on success, 0 on failure > mybigkey = specification of package to merge; myparent = parent package (one depending on me); >- addme = should I be added to the tree? (for the --onlydeps mode)""" >+ addme = should I be added to the tree? (for the --dependencies-only mode)""" > #stuff to add: > #SLOT-aware emerge > #IUSE-aware emerge >@@ -715,15 +715,15 @@ > sys.exit(1) > mytbz2=xpak.tbz2(x) > mykey=mytbz2.getelements("CATEGORY")[0]+"/"+os.path.basename(x)[:-5] >- if not self.create(["binary",portage.root,mykey],None,"--onlydeps" not in myopts): >+ if not self.create(["binary",portage.root,mykey],None,"--dependencies-only" not in myopts): > return (0,myfavorites) >- elif not "--oneshot" in myopts: >+ elif not "--once-only" in myopts: > myfavorites.append(mykey) > elif x[-7:]==".ebuild": > mykey=os.path.basename(os.path.abspath(x+"/../.."))+"/"+os.path.basename(x)[:-7] >- if not self.create(["ebuild",portage.root,mykey],None,"--onlydeps" not in myopts): >+ if not self.create(["ebuild",portage.root,mykey],None,"--dependencies-only" not in myopts): > return (0,myfavorites) >- elif not "--oneshot" in myopts: >+ elif not "--once-only" in myopts: > myfavorites.append(mykey) > else: > mykey=portage.dep_expand(x,portage.portdb) >@@ -737,11 +737,11 @@ > > if not self.mysd: > return (0,myfavorites) >- elif not "--oneshot" in myopts: >+ elif not "--once-only" in myopts: > myfavorites.append(mykey) > > self.missingbins=0 >- if "--usepkgonly" in myopts: >+ if "--use-package-only" in myopts: > for x in self.digraph.dict.keys(): > xs=string.split(x," ") > if (xs[0] != "binary") and (xs[3]=="merge"): >@@ -795,11 +795,11 @@ > else: > #We are not processing a blocker but a normal dependency > myeb_pkg=None >- if ("--usepkg" in myopts): >+ if ("--use-package" in myopts): > myeb_pkg=portage.db[portage.root]["bintree"].dep_bestmatch(x) > > myeb=None >- if ("--usepkgonly" not in myopts): >+ if ("--use-package-only" not in myopts): > myeb=portage.portdb.xmatch("bestmatch-visible",x) > > if (not myeb) and (not myeb_pkg): >@@ -811,7 +811,7 @@ > xfrom = '(dependency required by '+green('"'+myparent.split()[2]+'"')+red(' ['+myparent.split()[0]+"])") > alleb=portage.portdb.xmatch("match-all",x) > if alleb: >- if "--usepkgonly" not in myopts: >+ if "--use-package-only" not in myopts: > print "\n!!! "+red("all ebuilds that could satisfy ")+green(xinfo)+red(" have been masked.") > if myparent: > print "!!! "+red(xfrom) >@@ -837,7 +837,7 @@ > else: > myeb = None > >- if "--upgradeonly" in myopts: >+ if "--upgrade-only" in myopts: > # Check that there isn't a newer version of this package already installed > cand=self.is_newer_ver_installed(myroot,x,myeb) > if cand: >@@ -851,7 +851,7 @@ > sys.stderr.write("!!! Confused... Don't know what I'm using for dependency info. :(\n") > sys.exit(1) > >- #if "--usepkg" in myopts: >+ #if "--use-package" in myopts: > # #If we want to use packages, see if we have a pre-built one... > # mypk=portage.db["/"]["bintree"].dbapi.match(x) > # if myeb in mypk: >@@ -867,8 +867,8 @@ > return 0 > else: > #if mysource is not set, then we are a command-line dependency and should not be added >- #if --onlydeps is specified. >- if not self.create(myk,myparent,"--onlydeps" not in myopts): >+ #if --dependencies-only is specified. >+ if not self.create(myk,myparent,"--dependencies-only" not in myopts): > return 0 > > if "--debug" in myopts: >@@ -940,18 +940,18 @@ > #this is an unavailable world entry; just continue > continue > >- if "--upgradeonly" in myopts: >+ if "--upgrade-only" in myopts: > cand=self.is_newer_ver_installed(portage.root,mydep,myeb) > if cand: > myeb=cand > > #THIS NEXT BUNCH OF CODE NEEDS TO BE REPLACED TO SUPPORT WORLD ANTI-DEPS > #if mydep2[0]=="!":, etc. >- if "--usepkg" in myopts: >+ if "--use-package" in myopts: > mypk=portage.db[portage.root]["bintree"].dep_bestmatch(mydep) > if myeb==mypk: > myk=["binary",portage.root,mypk] >- elif "--usepkgonly" in myopts: >+ elif "--use-package-only" in myopts: > self.missingbins += [myeb] > myk=["binary",portage.root,myeb] > #print "mypk:",mypk >@@ -987,7 +987,7 @@ > print > sys.exit(1) > >- if "--usepkg" in myopts: >+ if "--use-package" in myopts: > mypk=portage.db[portage.root]["bintree"].dep_bestmatch(mydep) > if myeb==mypk: > myk="binary "+portage.root+" "+mypk >@@ -1028,9 +1028,9 @@ > #we need to use "--emptrytree" testing here rather than "empty" param testing because "empty" > #param is used for -u, where you still *do* want to see when something is being upgraded. > myoldbest="" >- if (not "--emptytree" in myopts) and portage.db[x[1]]["vartree"].exists_specific(x[2]): >+ if (not "--empty-tree" in myopts) and portage.db[x[1]]["vartree"].exists_specific(x[2]): > addl=" "+yellow("R")+fetch+" " >- elif (not "--emptytree" in myopts) and portage.db[x[1]]["vartree"].exists_specific_cat(x[2]): >+ elif (not "--empty-tree" in myopts) and portage.db[x[1]]["vartree"].exists_specific_cat(x[2]): > myoldbest=portage.best(portage.db[x[1]]["vartree"].dbapi.match(portage.pkgsplit(x[2])[0])) > > try: >@@ -1113,7 +1113,7 @@ > mysplit=portage.pkgsplit(x[2]) > # XXX mysplit _can_ be None.... Why? > if mysplit and (len(mysplit)==3): >- if "--emptytree" not in myopts: >+ if "--empty-tree" not in myopts: > if mysplit[0]=="sys-apps/portage": > if mysplit[1]+mysplit[2]!=portage.VERSION: > if mylist.index(x)<len(mylist)-1: >@@ -1123,7 +1123,7 @@ > print darkgreen(" You may avoid the remerging of packages by updating portage on its own.") > print > else: >- if mysplit[0]=="sys-apps/portage" and ("--emptytree" in myopts): >+ if mysplit[0]=="sys-apps/portage" and ("--empty-tree" in myopts): > if mysplit[1]+mysplit[2]!=portage.VERSION: > print red("***")+" Please update portage to the above version before proceeding." > print " Failure to do so may result in failed or improper merges." >@@ -1191,7 +1191,7 @@ > mymergelist=[] > > #check for blocking dependencies >- if ("--fetchonly" not in myopts) and ("--buildpkgonly" not in myopts): >+ if ("--fetch-only" not in myopts) and ("--build-package-only" not in myopts): > for x in mylist: > if x[0]=="blocks": > print "\n!!! Error: the "+x[2]+" package conflicts with another package." >@@ -1206,7 +1206,7 @@ > print green("*** Resuming merge...") > emergelog(" *** Resuming merge...") > mymergelist=portage.mtimedb["resume"]["mergelist"][:] >- if ("--skipfirst" in myopts) and mymergelist: >+ if ("--skip-first" in myopts) and mymergelist: > del mymergelist[0] > else: > myfavs=portage.grabfile(portage.root+"var/cache/edb/world") >@@ -1219,13 +1219,13 @@ > else: > # Add to the world file. Since we won't be able to later. > myfavkey=portage.cpv_getkey(mylist[x][2]) >- if (not "--fetchonly" in myopts) and (myfavkey in favorites): >+ if (not "--fetch-only" in myopts) and (myfavkey in favorites): > #don't record if already in system profile or already recorded > if (not mysysdict.has_key(myfavkey)) and (not myfavdict.has_key(myfavkey)): > #we don't have a favorites entry for this package yet; add one > myfavdict[myfavkey]=myfavkey > print ">>> Recording",myfavkey,"in \"world\" favorites file..." >- if not "--fetchonly" in myopts: >+ if not "--fetch-only" in myopts: > portage.writedict(myfavdict,portage.root+"var/cache/edb/world",writekey=0) > > portage.mtimedb["resume"]["mergelist"]=mymergelist[:] >@@ -1251,7 +1251,7 @@ > print ">>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+")",x[pkgindex],"to",x[1] > emergelog(" >>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" to "+x[1]) > if x[0] in ["ebuild","blocks"]: >- if ("--fetchonly" in myopts) or (x[0]=="blocks"): >+ if ("--fetch-only" in myopts) or (x[0]=="blocks"): > retval=portage.doebuild(y,"fetch",myroot,edebug,("--pretend" in myopts),fetchonly=1) > if retval: > print >@@ -1259,7 +1259,7 @@ > print > returnme=1 > continue >- elif "--buildpkg" in myopts: >+ elif "--build-package" in myopts: > #create pkg, then merge pkg > emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Cleaning ("+y+")") > retval=portage.doebuild(y,"clean",myroot,edebug) >@@ -1271,7 +1271,7 @@ > if retval: > sys.exit(1) > #dynamically update our database >- if "--buildpkgonly" not in myopts: >+ if "--build-package-only" not in myopts: > portage.db[portage.root]["bintree"].inject(x[2]) > mytbz2=portage.db[portage.root]["bintree"].getname(x[2]) > emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Merging ("+y+")") >@@ -1297,10 +1297,10 @@ > if retval==None: > sys.exit(1) > #need to check for errors >- if "--buildpkgonly" not in myopts: >+ if "--build-package-only" not in myopts: > portage.db[x[1]]["vartree"].inject(x[2]) > myfavkey=portage.cpv_getkey(x[2]) >- if (not "--fetchonly" in myopts) and (myfavkey in favorites): >+ if (not "--fetch-only" in myopts) and (myfavkey in favorites): > myfavs=portage.grabfile(myroot+"var/cache/edb/world") > myfavdict=genericdict(myfavs) > mysysdict=genericdict(syslist) >@@ -1318,7 +1318,7 @@ > if retval: > sys.exit(1) > >- if ("--pretend" not in myopts) and ("--fetchonly" not in myopts): >+ if ("--pretend" not in myopts) and ("--fetch-only" not in myopts): > # Clean the old package that we have merged over top of it. > if portage.settings.has_key("AUTOCLEAN") and (portage.settings["AUTOCLEAN"]=="yes"): > xsplit=portage.pkgsplit(x[2]) >@@ -1348,7 +1348,7 @@ > portage.portageexit() > os.execv("/usr/lib/portage/bin/emerge", myargv) > >- if ("--pretend" not in myopts) and ("--fetchonly" not in myopts): >+ if ("--pretend" not in myopts) and ("--fetch-only" not in myopts): > emergelog(" ::: completed emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[2]+" to "+x[1]) > > # Unsafe for parallel merges >@@ -1361,13 +1361,13 @@ > del portage.mtimedb["resume"] > > if ("--pretend" not in myopts): >- if ("--fetchonly" not in myopts): >+ if ("--fetch-only" not in myopts): > if (mergecount>0): > portage.env_update() > >- #by doing an exit this way, --fetchonly can continue to try to >+ #by doing an exit this way, --fetch-only can continue to try to > #fetch everything even if a particular download fails. >- if "--fetchonly" in myopts: >+ if "--fetch-only" in myopts: > if returnme: > print "\n\n!!! Some fetch errors were encountered. Please see above for details.\n\n" > sys.exit(returnme) >@@ -1913,11 +1913,11 @@ > sys.exit(1) > print "\b\b ... done!" > >- if ("--usepkgonly" in myopts) and mydepgraph.missingbins: >+ if ("--use-package-only" in myopts) and mydepgraph.missingbins: > sys.stderr.write(red("The following binaries are not available for merging...\n")) > for x in mydepgraph.missingbins: > sys.stderr.write(" "+str(x)+"\n") >- sys.stderr.write("\nThese are required by '--usepkgonly' -- Terminating.\n\n") >+ sys.stderr.write("\nThese are required by '--use-package-only' -- Terminating.\n\n") > sys.exit(1) > > alldeps=mydepgraph.digraph.allnodes() >@@ -1997,7 +1997,7 @@ > else: > favorites=[] > syslist=getlist("system") >- if ("--pretend" in myopts) and not ("--fetchonly" in myopts): >+ if ("--pretend" in myopts) and not ("--fetch-only" in myopts): > print > print darkgreen("These are the packages that I would merge, in order:") > print >@@ -2036,24 +2036,24 @@ > sys.exit(1) > print "\b\b ...done!" > >- if ("--usepkgonly" in myopts) and mydepgraph.missingbins: >+ if ("--use-package-only" in myopts) and mydepgraph.missingbins: > sys.stderr.write(red("The following binaries are not available for merging...\n")) > > if mydepgraph.missingbins: > for x in mydepgraph.missingbins: > sys.stderr.write(" "+str(x)+"\n") >- sys.stderr.write("\nThese are required by '--usepkgonly' -- Terminating.\n\n") >+ sys.stderr.write("\nThese are required by '--use-package-only' -- Terminating.\n\n") > sys.exit(1) > >- if ("--pretend" in myopts) and ("--fetchonly" not in myopts): >+ if ("--pretend" in myopts) and ("--fetch-only" not in myopts): > if ("--resume" in myopts): > mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) > else: > mydepgraph.display(mydepgraph.altlist()) > else: >- if ("--buildpkgonly" in myopts): >+ if ("--build-package-only" in myopts): > if not mydepgraph.digraph.hasallzeros(): >- print "\n!!! --buildpkgonly requires all dependencies to be merged." >+ print "\n!!! --build-package-only requires all dependencies to be merged." > print "!!! Cannot merge requested packages. Merge deps and try again.\n" > sys.exit(1) > >@@ -2064,7 +2064,7 @@ > portage.mtimedb["resume"]={} > portage.mtimedb["resume"]["myopts"]=myopts > portage.mtimedb["resume"]["favorites"]=favorites >- if ("--digest" in myopts) and not ("--fetchonly" in myopts): >+ if ("--digest" in myopts) and not ("--fetch-only" in myopts): > for pkgline in mydepgraph.altlist(): > if pkgline[0]=="ebuild" and pkgline[3]=="merge": > y=portage.portdb.findname(pkgline[2])
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2365
: 16797 |
16798