Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 16404 Details for
Bug 4229
emerge --pretend in a tree listing format
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for portage.py/emerge
bugs.4229.patch (text/plain), 5.42 KB, created by
Masatomo Nakano (RETIRED)
on 2003-08-20 18:55:10 UTC
(
hide
)
Description:
patch for portage.py/emerge
Filename:
MIME Type:
Creator:
Masatomo Nakano (RETIRED)
Created:
2003-08-20 18:55:10 UTC
Size:
5.42 KB
patch
obsolete
>--- emerge.org 2003-08-17 20:58:30.000000000 +0100 >+++ emerge 2003-08-21 02:46:35.000000000 +0100 >@@ -52,6 +52,7 @@ > "--quiet", "--resume", > "--searchdesc", "--selective", > "--skipfirst", >+"--tree", > "--update", "--upgradeonly", > "--usepkg", "--usepkgonly", > "--verbose", "--version" >@@ -73,6 +74,7 @@ > "p":"--pretend", "P":"--prune", > "q":"--quiet", > "s":"--search", "S":"--searchdesc", >+'t':"--tree", > "u":"--update", "U":"--upgradeonly", > "v":"--verbose", "V":"--version" > } >@@ -152,6 +154,10 @@ > print "emerge: please specify a package class (\"world\" or \"system\") or individual packages, but not both." > sys.exit(1) > >+if ("--tree" in myopts) and ("--columns" in myopts): >+ print "emerge: can't specify both of \"--tree\" and \"--columns\"." >+ sys.exit(1) >+ > # Always create packages if FEATURES=buildpkg > # Imply --buildpkg if --buildpkgonly > if ("buildpkg" in portage.features) or ("--buildpkgonly" in myopts): >@@ -1000,6 +1006,9 @@ > > def display(self,mylist): > changelogs=[] >+ p=[] >+ intree=False >+ > for x in mylist: > #print x > fetch=" " >@@ -1020,7 +1029,11 @@ > print > else: > if x[3]=="nomerge": >- continue >+ if ("--tree" in myopts): >+ if (not intree): >+ continue >+ else: >+ continue > > if ("fetch" in string.split(portage.portdb.aux_get(x[2],["RESTRICT"])[0])): > fetch = red("F") >@@ -1085,9 +1098,19 @@ > oldlp=mywidth-30 > newlp=oldlp-30 > >+ mygraph = self.digraph.copy() >+ indent="" >+ if ("--tree" in myopts): >+ indent=" "*mygraph.depth(string.join(x)) >+ if indent=="": >+ intree=False >+ else: >+ intree=True >+ >+ > if x[1]!="/": > if "--columns" in myopts: >- myprint="["+x[0]+" "+addl+"] "+darkgreen(xs[0]) >+ myprint="["+x[0]+" "+addl+"] "+indent+darkgreen(xs[0]) > if (newlp-len(myprint)) > 0: > myprint=myprint+(" "*(newlp-len(myprint))) > myprint=myprint+"["+darkblue(xs[1]+xs[2])+"] " >@@ -1099,7 +1122,7 @@ > myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+darkgreen("to "+x[1])+" "+iuse > else: > if "--columns" in myopts: >- myprint="["+x[0]+" "+addl+"] "+darkgreen(xs[0]) >+ myprint="["+x[0]+" "+addl+"] "+indent+darkgreen(xs[0]) > if (newlp-len(myprint)) > 0: > myprint=myprint+(" "*(newlp-len(myprint))) > myprint=myprint+green(" ["+xs[1]+xs[2]+"] ") >@@ -1107,29 +1130,40 @@ > myprint=myprint+(" "*(oldlp-len(myprint))) > myprint=myprint+myoldbest+" "+iuse > else: >- myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+iuse >- print myprint >+ if x[3]=="nomerge": >+ myprint=darkblue("[nomerge ] "+indent+x[2]+" "+myoldbest+" ")+iuse >+ else: >+ myprint="["+x[0]+" "+addl+"] "+indent+darkgreen(x[2])+" "+myoldbest+" "+iuse >+ p.append(myprint) > >- mysplit=portage.pkgsplit(x[2]) >- # XXX mysplit _can_ be None.... Why? >- if mysplit and (len(mysplit)==3): >- if "--emptytree" not in myopts: >- if mysplit[0]=="sys-apps/portage": >- if mysplit[1]+mysplit[2]!=portage.VERSION: >- if mylist.index(x)<len(mylist)-1: >- print red("*** Portage will stop merging at this point and reload itself,") >- print red(" recalculate dependencies, and complete the merge.") >- if "--update" not in myopts: >- 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[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." >- print " A simple '"+green("emerge -u portage")+"' is sufficient." >- print >- del mysplit >+ if ("--tree" not in myopts): >+ mysplit=portage.pkgsplit(x[2]) >+ >+ # XXX mysplit _can_ be None.... Why? >+ if mysplit and (len(mysplit)==3): >+ if "--emptytree" not in myopts: >+ if mysplit[0]=="sys-apps/portage": >+ if mysplit[1]+mysplit[2]!=portage.VERSION: >+ if mylist.index(x)<len(mylist)-1: >+ p.append(red("*** Portage will stop merging at this point and reload itself,")) >+ p.append(red(" recalculate dependencies, and complete the merge.")) >+ if "--update" not in myopts: >+ p.append(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[1]+mysplit[2]!=portage.VERSION: >+ p.append(red("***")+" Please update portage to the above version before proceeding.") >+ p.append(" Failure to do so may result in failed or improper merges.") >+ p.append(" A simple '"+green("emerge -u portage")+"' is sufficient.") >+ p.append("") >+ del mysplit >+ >+ if ("--tree" in myopts): >+ p.reverse() >+ >+ for x in p: >+ print x > > if "--changelog" in myopts: > print >--- portage.py.org 2003-08-17 21:19:08.000000000 +0100 >+++ portage.py 2003-08-21 02:34:21.000000000 +0100 >@@ -370,7 +370,14 @@ > for x in self.okeys: > if self.dict[x][0]==0: > return x >- return None >+ return None >+ >+ def depth(self, mykey): >+ depth=0 >+ while (self.dict[mykey][1]): >+ depth=depth+1 >+ mykey=self.dict[mykey][1][0] >+ return depth > > def allzeros(self): > "returns all nodes with zero references, or NULL if no such node exists"
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 4229
:
15490
|
15652
|
16404
|
19474