[RULE] Determine the size of a packetlist

Rodolfo J. Paiz rpaiz at simpaticus.com
Fri Oct 22 00:39:57 EEST 2004

On Thu, 2004-10-21 at 21:09 +0200, Ingo Lantschner wrote:
> Provided: Redhat 9 installed system, with rpmdb from FC3-test or FC2
> installed.
> If I have a list of FC3-test-3-rpms, how can I determine the size of these
> packages?!

I know of no sure way. "rpm -qi" seems to report the size of the package
file, not the size of the installed file. This can be a substantial
difference since text files (like documentation) are quite compressible.

The way I do it is to do repetitive "rpm --test -e" commands until I
have a set of packages which will uninstall without error. Then I do
this: "df && rpm -e $PKGLIST && df". That way I get the amount of space
freed on disk, rounded to the nearest 4KB since that's the size of an
inode on disk.

That's about the most exact method I know so far, and it also explains
why my page on the subject has packages in groups. <smile> I wish I
could get the individual totals... would make my life much easier.

Keep in mind that there's *always* going to be some error, since every
file must take up one inode and that's specific to your disk. But we can
at least get pretty close. <smile>


Rodolfo J. Paiz <rpaiz at simpaticus.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.hellug.gr/pipermail/rule-list/attachments/20041021/300508ed/attachment.pgp>
-------------- next part --------------
Original home page of the RULE project: www.rule-project.org
Rule-list at rule-project.org

This full static mirror of the Run Up to Date Linux Everywhere Project mailing list, originally hosted at http://lists.hellug.gr/mailman/listinfo/rule-list, is kept online by Free Software popularizer, researcher and trainer Marco Fioretti. To know how you can support this archive, and Marco's work in general, please click here