[pacman-dev] [patch] Display size for packages
Dan McGee
dpmcgee at gmail.com
Mon May 14 01:26:40 EDT 2007
On 5/6/07, Nathan Jones <nathanj at insightbb.com> wrote:
> This patch adds a -z|--showsize option to the -Q and -S commands. The
> option displays the size of individual packages. This is something that
> I have wanted for a while, and there is a feature request for it [1].
This is great, thanks for the patch. I just pushed it to my GIT tree,
it should show up soon on archlinux.org.
<http://projects.archlinux.org/git/gitweb.cgi?p=pacman.git;a=summary>
If you didn't know already, future development has shifted to GIT, so
I had to adopt your patch slightly to match up with the changed code
there. I made a few other small changes as well, but nothing huge.
> I'm sure that everyone does not want to add too many flags to pacman, so
> would it be preferable to have a DisplaySize option in pacman.conf
> instead?
No one else on the list has said anything about this, so this is a
request for comment. If you feel like it would be the better way to
go, feel free to submit a patch (knowing that your first one is
already implemented).
> There are quite a few places where dividing by 1024 takes place to
> display the size, and this patch adds a few more. Would it be best to
> create a humanize_size() function to switch to the appropriate measure
> (KB, MB, or GB)?
I wanted to do this at some point as well. If you want to take a crack
at it and stick it in util.c, feel free to do so. There are two
separate things that are done with it, however- sizes and speeds, so
it would have to accommodate both.
Thanks again!
-Dan
More information about the pacman-dev
mailing list