]> git.donarmstrong.com Git - bin.git/blob - wnppalert
remove things which have appropriate rules
[bin.git] / wnppalert
1 #! /bin/sh -e
2
3 # wnppalert -- check for orphaned or put up for adoption, installed packages
4
5 # get a list of packages with bugnumbers. I tried with LDAP, but this is _much_
6 # faster
7
8 INSTALLED=`mktemp ${TMPDIR:-/tmp}/wnppalert-installed.XXXXXX`
9 WNPP=`mktemp ${TMPDIR:-/tmp}/wnppalert-wnpp.XXXXXX`
10 WNPP_PACKAGES=`mktemp ${TMPDIR:-/tmp}/wnppalert-wnpp_packages.XXXXXX`
11
12 wget -qO - http://www.debian.org/devel/wnpp/orphaned| \
13 egrep '^<li><a href="http://bugs.debian.org/'| \
14 sed 's/<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:]*\): \([^<]*\)<\/a>.*/O   \1 \2 -- \3/'\
15 > $WNPP
16
17 wget -qO - http://www.debian.org/devel/wnpp/rfa_bypackage| \
18 egrep '^<li><a href="http://bugs.debian.org/'| \
19 sed 's/<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:]*\): \([^<]*\)<\/a>.*/RFA \1 \2 -- \3/'\
20 >> $WNPP
21
22 cut -f3 -d' ' $WNPP | sort > $WNPP_PACKAGES
23
24 # A list of installed files. This shouldn't use /var/lib/dpkg/status directly, but speed ...
25
26 grep -B1 'Status: install ok installed' /var/lib/dpkg/status| \
27 grep Package| \
28 cut -f2 -d' '| \
29 sort \
30 > $INSTALLED
31
32 (
33 comm -12 $WNPP_PACKAGES $INSTALLED | xargs -i grep {} $WNPP
34 echo
35 echo "Yours obediently, $0"
36 )
37
38 rm $WNPP $WNPP_PACKAGES $INSTALLED
39