How to determine the install-size of a packagelist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi all,
just in the process of determining the install-size *) of huge packetlist, I found this "solution":


*)how many megabytes will a given list of rpms need on the disk, once they are installed. And this question must beanswered before installation on a system with diffrent version and w/o installed packages. (So f.e. I have Redhat9 and want to determine the install-size of a Fedora Core 2 packagelist for future install.)


This code: #!/bin/sh declare -i x # x is integer let x=0 let y=0 # y is string echo " Int | String" for rpm in `grep -v '^--' $1` do rpm -qp --qf "[%{fssizes} \n]" $rpm x=`rpm -qp --qf "[%{fssizes}]" $rpm` y=`rpm -qp --qf "[%{fssizes}]" $rpm` echo "$x | $y" echo "------------------------------------" done;


Shows this output:

$ ~/.scripts/chkrpmsize.sh /sl/slinky-0.4.05/filesystem/scripts/3/all_packages.disc1 2> /dev/null
Int | String
1179325
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5780536899596517376 | 11793250000000000000000
------------------------------------
190713288
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-2202804535703371776 | 1907132880000000000000000
------------------------------------


etc.

Any idea pls. how to get numeric values from rpm/script which can be calculated by bash?!

TIA, Ingo.

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux