Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 16234 Details for
Bug 23305
Code that shows the size of each package, aswell as the total size
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
updated patch
size.patch (text/plain), 2.50 KB, created by
mathias stearn
on 2003-08-17 16:10:14 UTC
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
mathias stearn
Created:
2003-08-17 16:10:14 UTC
Size:
2.50 KB
patch
obsolete
>--- /usr/lib/portage/emerge 2003-06-24 15:50:50.000000000 -0400 >+++ /usr/lib/portage/emerge 2003-06-30 08:55:02.000000000 -0400 >@@ -924,6 +924,8 @@ > > def display(self,mylist): > changelogs=[] >+ totalsize=0 >+ > for x in mylist: > if x[0]=="blocks": > addl=""+red("B")+" " >@@ -989,6 +991,32 @@ > if ebuild_iuse != "": > iuse=iuse+blue("-"+ebuild_iuse)+" " > >+ >+ >+ >+ mysize = [0] >+ mydigest = portage.db["/"]["porttree"].dbapi.finddigest(x[2]) >+ >+ >+ try: >+ myfile = open(mydigest,"r") >+ for line in myfile.readlines(): >+ mysize[0] += int(line.split(" ")[3]) >+ myfile.close() >+ totalsize+=mysize[0] >+ mystr = str(mysize[0]/1024) >+ mycount=len(mystr) >+ while (mycount > 3): >+ mycount-=3 >+ mystr=mystr[:mycount]+","+mystr[mycount:] >+ mysize[0]=mystr+" kB" >+ except Exception, e: >+ if edebug: >+ print "!!! Exception:",e >+ mysize[0]="Size Unavailable" >+ >+ >+ > xs=portage.pkgsplit(x[2]) > if xs[2]=="r0": > xs[2]="" >@@ -1012,8 +1040,9 @@ > myprint=myprint+" "*(oldlp-len(myprint)) > myprint=myprint+myoldbest > myprint=myprint+darkgreen(" to "+x[1])+" "+iuse >+ myprint=myprint+" "+purple(mysize[0]) > else: >- myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+darkgreen("to "+x[1])+" "+iuse >+ myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+darkgreen("to "+x[1])+" "+iuse+" "+purple(mysize[0]) > else: > if "--columns" in myopts: > myprint="["+x[0]+" "+addl+"] "+darkgreen(xs[0]) >@@ -1023,10 +1052,12 @@ > if (oldlp-len(myprint)) > 0: > myprint=myprint+(" "*(oldlp-len(myprint))) > myprint=myprint+myoldbest+" "+iuse >+ myprint=myprint+" "+purple(mysize[0]) > else: >- myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+iuse >+ myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+iuse+" "+purple(mysize[0]) > print myprint > >+ > mysplit=portage.pkgsplit(x[2]) > # XXX mysplit _can_ be None.... Why? > if mysplit and (len(mysplit)==3): >@@ -1054,6 +1085,14 @@ > print bold('*'+revision) > sys.stdout.write(text) > >+ mystr = str(totalsize/1024) >+ mycount=len(mystr) >+ while (mycount > 3): >+ mycount-=3 >+ mystr=mystr[:mycount]+","+mystr[mycount:] >+ print >+ print "Total size of downloads: "+purple(mystr+" kb") >+ > def calc_changelog(self,ebuildpath,current,next): > current = '-'.join(portage.catpkgsplit(current)[1:]) > if current.endswith('-r0'): current = current[:-3]
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 23305
:
13705
|
13747
|
13748
|
13749
|
14034
|
16234
|
16236
|
19035
|
21441
|
21474
|
21894
|
22286