[pacman-dev] [PATCH 1/2] contrib: adding pacsize
Pierre Neidhardt
ambrevar at gmail.com
Wed Mar 5 11:22:18 EST 2014
On 14-03-05 10:38:36, Andrew Gregory wrote:
> 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
This is actually something I've been wondering for a while: how do you change
the size unit?
--
Pierre Neidhardt
"Remember, extremism in the nondefense of moderation is not a virtue."
-- Peter Neumann, about usenet
More information about the pacman-dev
mailing list