You are not logged in.
Hi :
I am working on a script to optimize my pkgs download speed and I need to know the size of each package to be downloaded.I've read `man pacman` and /var/lib/pacman/local/* and no clue found.
#+begin_src bash
sudo pacman -Su
blahblah
Total Download Size: 93.28 MiB # How? I need to know the size of *each* package not *Total*
Total Installed Size: 325.88 MiB
Net Upgrade Size: 1.29 MiB
#+end_src
Last edited by anix (2012-03-07 15:00:15)
/arch/gentoo/openbsd/
Offline
The only way I know would be to
$ pacman -Sup --print-format %n
...
tzdata
glibc
dnsmasq
gcc-libs
ppl
gcc
git
...and parse the output to separate each package, then run each package through pacman -Si and parse that for the package size:
$ pacman -Si dnsmasq
...
Download Size : 170.40 KiB
...Last edited by alphaniner (2012-03-07 14:41:21)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Not sure if this is what you want, but put (or uncomment) 'VerbosePkgLists' in your pacman.conf.
Targets (3):
Name Old Version New Version Net Change Download Size
git 1.7.9.2-1 1.7.9.3-1 0,01 MiB 2,43 MiB
libxmu 1.1.0-2 1.1.1-1 -0,05 MiB 0,07 MiB
xorg-fonts-encodings 1.0.4-2 1.0.4-3 0,00 MiB 0,54 MiB
Total Download Size: 3,03 MiB
Total Installed Size: 16,70 MiB
Net Upgrade Size: -0,05 MiBLast edited by karol (2012-03-07 14:39:40)
Offline
The only way I know would be to
$ pacman -Sup --print-format %n ... tzdata glibc dnsmasq gcc-libs ppl gcc git ...and parse the output to separate each package, then run each package through pacman -Si and parse that for the package size:
$ pacman -Si dnsmasq ... Download Size : 170.40 KiB ...
Except, the manpage would have told you that the %s token does exactly this already...
$ pacman -Qqu | pacman -Sp --print-format '%n %s' -
indent 106048
jre7-openjdk-headless 21809448
jre7-openjdk 179416
jdk7-openjdk 10247484
syslinux 813128I'm avoiding using -Sup as it prints an annoying ':: Starting full system upgrade...' as the first line.
Offline
Thanks, I hadn't yet gotten my %DV of attitude today.
Edit: Can't even quip properly, lol.
Last edited by alphaniner (2012-03-07 15:06:31)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
I've read `man pacman`
You should have read 'man pacman.conf' too:
VerbosePkgLists
Displays name, version and size of target packages formatted as a
table for upgrade, sync and remove operations.
+ what falconindy posted.
Offline
thanks.
both "uncomment 'VerbosePkgLists' in pacman.conf" and "pacman -Qqu | pacman -Sp --print-format '%n %s' -" works~
/arch/gentoo/openbsd/
Offline