Package: devscripts Version: 2.10.9 Severity: wishlist File: /usr/bin/wnpp-alert Tags: patch
Hi a diff option that display changes in the wnpp output could be useful, for instance when running wnpp-alert in a cronjob. With this option you can see only the differences between different executions of the program, seeing only the new or close RFH, O or RFA bugs. Please find the attached patch that adds this feature. Regards --- wnpp-alert 2007-10-04 23:48:23.000000000 +0200 +++ /usr/bin/wnpp-alert 2007-10-16 17:18:07.000000000 +0200 @@ -31,6 +31,23 @@ Modifications: Julian Gilbey <[EMAIL PROTECTED]>" } +diff () { + if [ ! -e $CACHEDIR/.wnpp-diff ]; then + # First use + comm -12 $WNPP_PACKAGES $INSTALLED | sed -e 's/+/\\+/g' | \ + xargs -i egrep '^[A-Z]+ [0-9]+ {} ' $WNPP > $CACHEDIR/.wnpp-diff + cat $CACHEDIR/.wnpp-diff + else + WNPPDIFF=`mktemp -t wnppalert-diff.XXXXXX` + comm -12 $WNPP_PACKAGES $INSTALLED | sed -e 's/+/\\+/g' | \ + xargs -i egrep '^[A-Z]+ [0-9]+ {} ' $WNPP > $WNPPDIFF + sort -o $CACHEDIR/.wnpp-diff $CACHEDIR/.wnpp-diff + sort -o $WNPPDIFF $WNPPDIFF + comm -3 $CACHEDIR/.wnpp-diff $WNPPDIFF | sed -e 's/\t//g' + mv $WNPPDIFF $CACHEDIR/.wnpp-diff + fi +} + if [ "x$1" = "x--help" -o "x$1" = "x-h" ]; then usage; exit 0; fi if [ "x$1" = "x--version" -o "x$1" = "x-v" ]; then version; exit 0; fi @@ -86,5 +103,11 @@ sort -u \ > $INSTALLED -comm -12 $WNPP_PACKAGES $INSTALLED | sed -e 's/+/\\+/g' | \ -xargs -i egrep '^[A-Z]+ [0-9]+ {} ' $WNPP +if [ "x$1" = "x--diff" -o "x$1" = "x-d" ]; then + diff; + exit 0; +else + comm -12 $WNPP_PACKAGES $INSTALLED | sed -e 's/+/\\+/g' | \ + xargs -i egrep '^[A-Z]+ [0-9]+ {} ' $WNPP + exit 0; +fi -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.23.1 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages devscripts depends on: ii debianutils 2.25.1 Miscellaneous utilities specific t ii dpkg-dev 1.14.7 package building tools for Debian ii libc6 2.6.1-5 GNU C Library: Shared libraries ii perl 5.8.8-11 Larry Wall's Practical Extraction ii sed 4.1.5-4 The GNU sed stream editor Versions of packages devscripts recommends: ii fakeroot 1.8.2 Gives a fake root environment -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]