Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 9699

Summary: Patch for portage emerge & ebuild to easily check how much to download.
Product: Portage Development Reporter: Jonathan Hunt <jhuntnz>
Component: UnclassifiedAssignee: Daniel Robbins (RETIRED) <drobbins>
Status: RESOLVED FIXED    
Severity: enhancement CC: alex, carpaski, h3y, jhuntnz, mholzer, vapier
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 5566    
Attachments: Patch to emerge.
Adds humansize function for converting int to a human readable size.
Patch to portage for "fetchsize" & "pfetchsize"

Description Jonathan Hunt 2002-10-26 06:17:34 UTC
Hi, 
 
I download stuff over a 56K modem so it is of interest to me to about how much 
downloading a package is going to require. 
This modification consists of three things. 
output.py.diff: Addes humansize function. 
portage.py.diff: Adds 2 more ebuild functions. 
		 "fetchsize". This instead of fetching the files will say 
		 how much fetching is left. Ie 6.4 MB or 1.3K etc. It gets 
		this info by parsing the digest files and checking if the 
		files to be downloaded already exist. If they do it subtracts 
		the amount already there for the size. Ie if u have downloaded 
		3 MB of an 8MB file it will tell you only 5MB remaining. 
		Also adds "pfetchsize". This is a version of fetchsize that is 
		used by portage. Rather than printing the amount to be 
		downloaded it exits with a return value of that amount. 
emerge.diff:	Changes emerge so that when doing "--pretend" it prints 
		by each package the size (it gets this size by using ebuild 
		pfetchsize). 
		And the bottum of the list it prints a total. 
 
This is my first time really using python. Let me know if you want anything 
fixed up or anything like that.
Comment 1 Jonathan Hunt 2002-10-26 06:18:14 UTC
Created attachment 5034 [details, diff]
Patch to emerge.
Comment 2 Jonathan Hunt 2002-10-26 06:19:05 UTC
Created attachment 5035 [details, diff]
Adds humansize function for converting int to a human readable size.
Comment 3 Jonathan Hunt 2002-10-26 06:19:43 UTC
Created attachment 5036 [details, diff]
Patch to portage for "fetchsize" & "pfetchsize"
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2002-11-14 05:36:01 UTC
The desired output is shown in search as of 2.0.44