[pacman-dev] [PATCH 1/2] contrib: adding pacsize

Andrew Gregory andrew.gregory.8 at gmail.com
Wed Mar 5 10:38:36 EST 2014


On 03/05/14 at 04:00pm, Pierre Neidhardt wrote:
> Printing package size is useful for maintenance. Indeed, the first entry on the
> wiki is focused on this topic:
> 
>   https://wiki.archlinux.org/index.php/Pacman_Tips#Maintenance
> 
> None of the proposed solutions will allow you to:
> - select packages;
> - work on the output of other commands yielding a list of packages;
> - change the sorting;
> - be locale independent;
> - print a grand total;
> - be fast (most solutions are wasting a lot of time -- only expac is faster);
> - not rely on any third-party tool.
> 
> Pacsize is a POSIX shell script that is generic enough to enclose all these
> features (and more).
> 
> Adding a 'pacsize' script eliminates the unneeded abundance of workarounds for
> this simple matter.
> 
> Signed-off-by: Pierre Neidhardt <ambrevar at gmail.com>
> ---
>  contrib/.gitignore    |   1 +
>  contrib/Makefile.am   |   3 +
>  contrib/README        |   4 ++
>  contrib/pacsize.sh.in | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 167 insertions(+)
>  create mode 100644 contrib/pacsize.sh.in

Your pacman parser doesn't understand size units:
 $ ./pacsize linux
     67 KiB linux
 $ pacman -Qi linux | grep Installed                                         [0][1078]
 Installed Size :  67.12 MiB


More information about the pacman-dev mailing list