[SCM] Git repository for devscripts branch, master, updated. v2.11.6-13-g81b0b57

James McCoy jamessan at debian.org
Sat May 5 16:03:36 UTC 2012


The following commit has been merged in the master branch:
commit 81b0b578d7739a9188727c7deee7bf2661294de4
Author: James McCoy <jamessan at debian.org>
Date:   Sat May 5 12:02:49 2012 -0400

    wnpp-alert: Use dpkg-query instead of directly parsing dpkg's status file.
    
    Closes: #669579
    Signed-off-by: James McCoy <jamessan at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 41b20c9..43dcd6b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ devscripts (2.11.7) UNRELEASED; urgency=low
   * debcheckout: Allow specifying a branch for Vcs-Git fields.  Thanks to
     Bernhard R. Link for the patch.  (Closes: #655085, #600745)
   * d/control: Change Maintainer address to devscripts-devel at lists.alioth.d.o
+  * wnpp-alert: Use dpkg-query instead of directly parsing dpkg's status file.
+    (Closes: #669579)
 
   [ Benjamin Drung ]
   * Introduce a test suite for the scripts based on shunit2.
diff --git a/scripts/wnpp-alert.sh b/scripts/wnpp-alert.sh
index 2eda6ae..72f0c79 100755
--- a/scripts/wnpp-alert.sh
+++ b/scripts/wnpp-alert.sh
@@ -108,11 +108,10 @@ cut -f3 -d' ' $WNPP | sort > $WNPP_PACKAGES
 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
+    dpkg-query -W -f '${Package} ${Status}\n${Source} ${Status}\n' | \
+        awk '/^[^ ].*install ok installed/{print $1}' | \
+        sort -u \
+        > $INSTALLED
 fi
 
 if [ -f "$WNPP_DIFF" ]; then

-- 
Git repository for devscripts



More information about the Devscripts-devel mailing list