Author: jamessan
Date: 2008-04-07 02:31:43 +0000 (Mon, 07 Apr 2008)
New Revision: 1276
Modified:
trunk/debian/changelog
trunk/scripts/wnpp-alert.1
trunk/scripts/wnpp-alert.sh
Log:
wnpp-alert: Allow the user to pass a list of packages to the script.
(Closes: #463665)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-04-07 01:28:09 UTC (rev 1275)
+++ trunk/debian/changelog 2008-04-07 02:31:43 UTC (rev 1276)
@@ -19,6 +19,8 @@
description.
* rc-alert: Allow the user to pass a list of packages to the script.
(Closes: #474659)
+ * wnpp-alert: Allow the user to pass a list of packages to the script.
+ (Closes: #463665)
-- Martin Zobel-Helas <[EMAIL PROTECTED]> Sun, 06 Apr 2008 21:43:04 +0200
Modified: trunk/scripts/wnpp-alert.1
===================================================================
--- trunk/scripts/wnpp-alert.1 2008-04-07 01:28:09 UTC (rev 1275)
+++ trunk/scripts/wnpp-alert.1 2008-04-07 02:31:43 UTC (rev 1276)
@@ -2,14 +2,15 @@
.SH NAME
wnpp-alert \- check for installed packages up for adoption or orphaned
.SH SYNOPSIS
-\fBwnpp-alert\fR
+\fBwnpp-alert [\-\-diff] [package ...]\fR
.br
-\fBwnpp-alert \-\-help|\-\-version|\-\-diff\fR
+\fBwnpp-alert \-\-help|\-\-version\fR
.SH DESCRIPTION
\fBwnpp-alert\fR downloads the lists of packages which have been
orphaned (O), are up for adoption (RFA), or the maintainer has asked
for help (RFH) from the WNPP webpages, and then outputs a list of
-packages installed on the system which are in those lists.
+packages installed on the system, or matching the listed packages,
+which are in those lists.
.PP
Note that WNPP, and therefore \fBwnpp-alert\fR's output, is source
package based.
Modified: trunk/scripts/wnpp-alert.sh
===================================================================
--- trunk/scripts/wnpp-alert.sh 2008-04-07 01:28:09 UTC (rev 1275)
+++ trunk/scripts/wnpp-alert.sh 2008-04-07 02:31:43 UTC (rev 1276)
@@ -18,10 +18,10 @@
CACHEDDIFF="${CACHEDIR}/wnpp-diff"
usage () { echo \
-"Usage: $PROGNAME [--help|-h|--version|-v]
- List all installed packages with Request for Adoption (RFA),
- Request for Help (RHF), or Orphaned (O) bugs against them,
- as determined from the WNPP website.
+"Usage: $PROGNAME [--help|-h|--version|-v|--diff|-d] [package ...]
+ List all installed (or listed) packages with Request for
+ Adoption (RFA), Request for Help (RHF), or Orphaned (O)
+ bugs against them, as determined from the WNPP website.
http://www.debian.org/devel/wnpp"
}
@@ -74,6 +74,7 @@
0 1 2 3 7 10 13 15
if [ "x$1" = "x--diff" ] || [ "x$1" = "x-d" ]; then
+ shift
WNPP_DIFF=`mktemp -t wnppalert-wnpp_diff.XXXXXX`
trap "rm -f '$INSTALLED' '$WNPP' '$WNPPTMP' '$WNPP_PACKAGES' '$WNPP_DIFF'"
\
0 1 2 3 7 10 13 15
@@ -104,13 +105,17 @@
# the dpkg source, defn of fieldinfos[] in lib/parse.c
# (and should match Devscripts/Packages.pm)
-grep -B2 -A7 'Status: install ok installed' /var/lib/dpkg/status | \
-grep '^\(Package\|Source\):' | \
-cut -f2 -d' ' | \
-sort -u \
-> $INSTALLED
+if [ $# -gt 0 ]; then
+ echo $* | tr ' ' '\n' | sort -u > $INSTALLED
+else
+ grep -B2 -A7 'Status: install ok installed' /var/lib/dpkg/status | \
+ grep '^\(Package\|Source\):' | \
+ cut -f2 -d' ' | \
+ sort -u \
+ > $INSTALLED
+fi
-if [ "x$1" = "x--diff" -o "x$1" = "x-d" ]; then
+if [ -f "$WNPP_DIFF" ]; then
if [ -d "$CACHEDIR" ]; then
wnppdiff
exit 0
--
To unsubscribe, send mail to [EMAIL PROTECTED]