Browse Source

Report error in popcon-largest-unused if /var/log/popularity-contest

is missing.
suites/ascii
Petter Reinholdtsen 19 years ago
parent
commit
944883e9d2
  1. 4
      debian/changelog
  2. 11
      popcon-largest-unused

4
debian/changelog

@ -1,6 +1,8 @@
popularity-contest (1.9) UNRELEASED; urgency=low
*
* Petter Reinholdtsen
- Report error in popcon-largest-unused if
/var/log/popularity-contest is missing.
-- Bill Allombert <ballombe@debian.org> Thu, 22 Jan 2004 22:18:38 +0100

11
popcon-largest-unused

@ -3,8 +3,15 @@
# Author: Yann Dirson <dirson@debian.org>
# License: GPL
grep '<OLD>' /var/log/popularity-contest |
cut -d' ' -f3 |
datafile=/var/log/popularity-contest
if [ ! -e $datafile ] ; then
echo "warning: Missing required file $datafile."
echo "info: Run 'popularity-contest > $datafile' to generate it."
exit 1
fi
grep '<OLD>' $datafile | cut -d' ' -f3 |
xargs apt-cache -o 'APT::Cache::AllVersions=0' show |
grep -E '^(Package|Installed-Size): ' |
perl -ne 'if (/^Package: (.*)/) { $p = $1 }; if (/^Installed-Size: (.*)/) { print "$1 $p\n"; $p = 'BUG' }' |

Loading…
Cancel
Save