Package: debian-goodies
Version: 0.47
Severity: wishlist
File: /usr/bin/dpigs

As it stands, dpigs only reports on individual binary packages;
although that's already enough to make it a useful tool, it sometimes
misses the bigger picture, with packages flying under the radar thanks
to having been split up or to depending on large specialized
libraries.  It's not clear how best to deal with the latter, but I've
implemented logic to determine how much space a given source package's
binaries occupies, and would appreciate it if you could integrate it
into dpigs.

Here's a relatively straightforward version that maintains dpigs's
existing output format, albeit with source rather than binary package
names:

grep-status -nsInstalled-size,Source:Package -F Status ' installed' $STATUS \
| perl -n00a -e '$s{$F[1]}+=$F[0]; END { for(keys %s) {print"$s{$_} $_\n"} }' \
| sort -rn \
| head --lines=$LINES

Here's another version that adds details of which binary packages are
involved (but not how big they are), with % standing in for the source
package's name:

grep-status -nsInstalled-size,Package,Source:Package -F Status ' installed' \
    $STATUS \
| perl -n00al12 -e '$s{$F[2]} += $F[0];
    $F[1] =~ s/\Q$F[2]\E/%/; $b{$F[2]}{$F[1]} = 1;
    END {$, = " "; for(keys %s) {print "$s{$_} $_:", sort keys %{$b{$_}}} }' \
| sort -rn \
| head --lines=$LINES

One complication is that Debian-built kernel packages will all count
towards linux-2.6, despite potentially coming from different versions
thereof; I'm not sure that's worth attempting to address beyond simply
documenting it, though.

At any rate, could you please consider including one or both versions
as an optional mode to dpigs?

Thanks!

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages debian-goodies depends on:
ii  curl                      7.18.2-8       Get a file from an HTTP, HTTPS or 
ii  dctrl-tools [grep-dctrl]  2.13.1         Command-line tools to process Debi
ii  dialog                    1.1-20080819-1 Displays user-friendly dialog boxe
ii  less                      418-1          Pager program similar to more
ii  lsof                      4.78.dfsg.1-4  List open files
ii  python                    2.5.2-3        An interactive high-level object-o
ii  whiptail                  0.52.2-11.3    Displays user-friendly dialog boxe

debian-goodies recommends no packages.

Versions of packages debian-goodies suggests:
ii  popularity-contest            1.46       Vote for your favourite packages a
ii  xdg-utils                     1.0.2-6.1  desktop integration utilities from
ii  zenity                        2.22.1-1   Display graphical dialog boxes fro

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to