[Yum] how to determine size of package

seth vidal skvidal at phy.duke.edu
Thu Aug 12 19:30:30 UTC 2004


On Thu, 2004-08-12 at 15:27, Paul Pianta wrote:
> hi people
> 
> I would like to be able to determine the size of each package available 
> in a yum repository - without doing a 'yum info' on each package. I want 
> to be able to list the available packages on a web page with the size of 
> the package next to it - then users can check the packages that they 
> wish to be included in a 'yum update/install xxxx' and click the update 
> button.
> 
> Firstly I run a 'yum list' to get the list of what is available - and 
> then run the results through 'rpm -q package[i]' to see if it is 
> available for install or update (ie. if package exists locally - update, 
> if not - install). The advantage of this pre-run 'yum list' is that I 
> have all of the current headers on the client machine. What I then 
> wanted to do was check header.info and pick out the size of each package 
> and use it to display on my web page next to the package name.
> 
> Unfortunately package size is not one of the goodies in the header.info 
> file for each package :\
> 
> Without hacking pullheaders.py - does anyone have an idea on how I can 
> get package size info on the client (for the new packages on the yum 
> server) ?

If you can wait a little while this data is in the new xml metadata and
will be trivially available in the newer yum.
-sv





More information about the Yum mailing list