[debian-edu-commits] debian-edu/ 01/01: Add new tool package-disk-usage to list how much disk space the installed packages uses.

Petter Reinholdtsen pere at moszumanska.debian.org
Thu Oct 9 09:15:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu-config.

commit e91eb89589aa20a98bfb1f5d6f8e0bcde771c5fa
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Oct 9 11:15:13 2014 +0200

    Add new tool package-disk-usage to list how much disk space the installed packages uses.
---
 Makefile                                         |  1 +
 debian/changelog                                 |  4 +++-
 share/debian-edu-config/tools/package-disk-usage | 10 ++++++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b5dd4d5..28385d5 100644
--- a/Makefile
+++ b/Makefile
@@ -372,6 +372,7 @@ install: install-testsuite
 		share/debian-edu-config/tools/nbdswap-cleanup \
 		share/debian-edu-config/tools/nightkill.sh \
 		share/debian-edu-config/tools/notify-local-users \
+		share/debian-edu-config/tools/package-disk-usage \
 		share/debian-edu-config/tools/password-fix-squeeze-r0 \
 		share/debian-edu-config/tools/pipegraph \
 		share/debian-edu-config/tools/preseed-ldap-kerberos \
diff --git a/debian/changelog b/debian/changelog
index e1e65d6..ec3cd34 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,9 +4,11 @@ debian-edu-config (1.810) UNRELEASED; urgency=high
   * Fix LDAP dataloss if the system is powered down or rebooted by
     unsetting 'dbnosync' in slapd-debian-edu.conf.
 
- [ Petter Reinholdtsen ]
+  [ Petter Reinholdtsen ]
   * Enable the auto flag in the PXE installation, to allow more settings
     to be fetched from the preseed file.
+  * Add new tool package-disk-usage to list how much disk space the
+    installed packages uses.
 
  -- Wolfgang Schweer <wschweer at arcor.de>  Tue, 07 Oct 2014 12:47:06 +0200
 
diff --git a/share/debian-edu-config/tools/package-disk-usage b/share/debian-edu-config/tools/package-disk-usage
new file mode 100755
index 0000000..e654569
--- /dev/null
+++ b/share/debian-edu-config/tools/package-disk-usage
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# List package disk usage for the installed packages.
+
+apt-cache -o 'APT::Cache::AllVersions=0' show \
+    $(dpkg -l|grep ^ii|awk '{print $2}') | \
+    grep -E '^(Package|Installed-Size): ' | \
+    perl -ne 'if (/^Package: (.*)/) { $p = $1 };  if (/^Installed-Size: (.*)/)
+{ print"$1 $p\n"; $p = 'BUG' }' | \
+    sort -rn

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list