SVN devscripts commit: r539 - in trunk: debian scripts

Stefano Zacchiroli zack at alioth.debian.org
Mon Feb 26 00:45:47 CET 2007


Author: zack
Date: 2007-02-26 00:45:47 +0100 (Mon, 26 Feb 2007)
New Revision: 539

Modified:
   trunk/debian/changelog
   trunk/scripts/tagpending.1
   trunk/scripts/tagpending.sh
Log:
tagpending: extra check for avoiding tagging bugs belonging to other packages

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-02-25 15:22:08 UTC (rev 538)
+++ trunk/debian/changelog	2007-02-25 23:45:47 UTC (rev 539)
@@ -44,10 +44,12 @@
     to tagging them as pending, based on a patch from Adam D. Barratt
     (Closes: #382884)
   * tagpending: factorized some code for delivering info to the user
+  * tagpending: added an extra check to ensure that bugs to be tagged belong
+    to the current package, also avoids tagging of wnpp bugs (Closes: #398178)
   * uscan: added --force-download to force download when changelog is in sync
     with upstream version, based on a patch from Ian Wienand (Closes: #364116)
 
- -- Stefano Zacchiroli <zack at debian.org>  Sun, 25 Feb 2007 16:17:41 +0100
+ -- Stefano Zacchiroli <zack at debian.org>  Mon, 26 Feb 2007 00:43:21 +0100
 
 devscripts (2.9.27) unstable; urgency=low
 

Modified: trunk/scripts/tagpending.1
===================================================================
--- trunk/scripts/tagpending.1	2007-02-25 15:22:08 UTC (rev 538)
+++ trunk/scripts/tagpending.1	2007-02-25 23:45:47 UTC (rev 539)
@@ -21,8 +21,9 @@
 List every bug checked.
 .TP
 .BR \-f ", " \-\-force
-Do not query the BTS for already tagged bugs, that is, force all bugs to
-be tagged as pending even if they already are.
+Do not query the BTS for already tagged or not owned bugs, that is, force all
+bugs to be tagged, no matter if they are already tagged or (worst) belong to
+other source packages.
 .TP
 .BR \-c ". " \-\-confirm
 For each bug tagged as pending, also tag it as confirmed.

Modified: trunk/scripts/tagpending.sh
===================================================================
--- trunk/scripts/tagpending.sh	2007-02-25 15:22:08 UTC (rev 538)
+++ trunk/scripts/tagpending.sh	2007-02-25 23:45:47 UTC (rev 539)
@@ -3,7 +3,7 @@
 # Purpose: tag all bugs pending which are not so already
 # 
 # Copyright 2004 Joshua Kwan <joshk at triplehelix.org>
-# Changes copyright 2004-06 by their respective authors.
+# Changes copyright 2004-07 by their respective authors.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of version 2 (only) of the GNU General Public
@@ -27,7 +27,7 @@
     -s, --silent        Silent mode
     -v, --verbose       Verbose mode: List bugs checked/tagged. 
                         NOTE: Verbose and silent mode can't be used together.
-    -f, --force         Do not query the BTS for already tagged bugs (force).
+    -f, --force         Do not query the BTS, (re-)tag all bug reports (force).
     -c, --confirm       Tag bugs as confirmed as well as pending
     -h, --help          This usage screen.
     -V, --version       Display the version and copyright information
@@ -54,6 +54,8 @@
 VERBOSE=0
 CONFIRM=0
 
+BTS_BASE_URL="http://bugs.debian.org/cgi-bin/pkgreport.cgi"
+
 while [ -n "$1" ]; do
   case "$1" in
     -n|--noact) DRY=1; shift ;;
@@ -99,8 +101,10 @@
   xargs -n1 echo)
 
 if [ "$USE_WGET" = "1" ]; then
-    bts_pending=$(wget -q -O - "http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src;data=$srcpkg;archive=no;pend-exc=done;include=pending" | \
+    bts_pending=$(wget -q -O - "$BTS_BASE_URL?which=src;data=$srcpkg;archive=no;pend-exc=done;include=pending" | \
 	sed -ne 's/.*<a href="bugreport.cgi?bug=\([0-9]*\).*/\1/; T; p')
+    bts_open=$(wget -q -O - "$BTS_BASE_URL?which=src;data=$srcpkg;archive=no;pend-exc=done" | \
+	sed -ne 's/.*<a href="bugreport.cgi?bug=\([0-9]*\).*/\1/; T; p')
 fi
 
 to_be_checked=$(printf '%s\n%s\n' "$changelog_closes" "$bts_pending" | sort | uniq -u)
@@ -112,10 +116,19 @@
   	echo -n "Checking bug #$bug: "
   fi
   if ! echo "$bts_pending" | grep -q "^${bug}$"; then
-    if [ "$VERBOSE" = "1" ]; then
-    	echo "needs tag"
+    if echo "$bts_open" | grep -q "^${bug}$" || [ "$USE_WGET" = "0" ] ; then
+      if [ "$VERBOSE" = "1" ]; then
+	  echo "needs tag"
+      fi
+      to_be_tagged="$to_be_tagged $bug"
+    else
+      msg="does not belong to this package (check bug no. or force)"
+      if [ "$VERBOSE" = "1" ]; then
+	echo "$msg"
+      else
+	echo "Warning: #$bug $msg."
+      fi
     fi
-    to_be_tagged="$to_be_tagged $bug"
   else
     if [ "$VERBOSE" = "1" ]; then
     	echo "already marked pending"




More information about the Devscripts-devel mailing list