[pacman-dev] [PATCH] Remove redundant transaction size output

Dan McGee dpmcgee at gmail.com
Fri Sep 30 11:06:25 EDT 2011


On Thu, Sep 29, 2011 at 7:42 PM, Allan McRae <allan at archlinux.org> wrote:
> I probably did go too sparse on the output.  So how about this:
>
>
> Download Size -> displayed whenever something is downloaded...  (current
> behavior)
>
> Package installation only: Installed Size  (current behavior)
>
> Package removal only: Removed Size  (current behavior)
>
>
> Everything else:
> (package upgrade, package installation/upgrade involving replacement,
> combination upgrade and installation)
> Installed Size and Net Upgrade Size
>
>
> So the only change would be not to print Removed Size when both Installed
> Size and Net Upgrade Size are outputted.
>
> i.e.  the entire patch would be:
>
> --- a/src/pacman/util.c
> +++ b/src/pacman/util.c
> @@ -892,7 +892,7 @@ static void _display_targets(alpm_list_t *targets, int
> verbose)
>                        size = humanize_size(isize, 'M', &label);
>                        printf(_("Total Installed Size:   %.2f %s\n"), size,
> label);
>                }
> -               if(rsize > 0) {
> +               if(rsize > 0 && isize == 0) {
>                        size = humanize_size(rsize, 'M', &label);
>                        printf(_("Total Removed Size:     %.2f %s\n"), size,
> label);
>                }
>

This gets my +1.

-Dan


More information about the pacman-dev mailing list