Package: localepurge Version: 0.5.1 Severity: normal Tags: patch
Hello, after upgrade from 0.4.1 localepurge reports silly freed disk space, like: localepurge: Disk space freed in /usr/share/locale: 14107933K localepurge: Disk space freed in /usr/share/man: 559906K Total disk space freed by localepurge: 14667839K Looking at the code get_used_space() when quickndirtycalc is true (i.e. QUICKNDIRTYCALC _not_ set, my config) uses "du -sb", which report the used space in _bytes_. When quickndirtycalc is false "df -P" is used, which reports used space in 1k blocks and should be ok. The following patch fixes the issue using "du -ks": --- a/localepurge 2006-05-27 16:55:02.571255000 +0200 +++ b/localepurge 2006-05-27 16:54:34.801519500 +0200 @@ -61,7 +61,7 @@ get_used_space() # Usage: get_used_space <dirname> { [ -d "$1" ] || return 1 # bail out if there's no such dir - set - $(du -bs $1) + set - $(du -ks $1) echo $1 } fi Luca Tettamanti -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17-rc5 Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8) Versions of packages localepurge depends on: ii debconf [debconf-2.0] 1.5.1 Debian configuration management sy ii debianutils 2.16.1 Miscellaneous utilities specific t ii dpkg 1.13.19 package maintenance system for Deb ii locales 2.3.999-1 GNU C Library: National Language ( ii procps 1:3.2.6-2.2 /proc file system utilities localepurge recommends no packages. -- debconf information: * localepurge/mandelete: true * localepurge/showfreedspace: true * localepurge/quickndirtycalc: true localepurge/remove_no: localepurge/none_selected: false * localepurge/nopurge: en, en_US, en_US.UTF-8, it, it_IT, [EMAIL PROTECTED] * localepurge/dontbothernew: false * localepurge/verbose: false -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]