r60749 - /scripts/qa/packagecheck

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Wed Jul 28 18:45:59 UTC 2010


Author: gregoa
Date: Wed Jul 28 18:45:50 2010
New Revision: 60749

URL: http://svn.debian.org/wsvn/?sc=1&rev=60749
Log:
new feature (added to the -R switch):
switch 'dh --with foo $@' to 'dh $@ --with foo'

Modified:
    scripts/qa/packagecheck

Modified: scripts/qa/packagecheck
URL: http://svn.debian.org/wsvn/scripts/qa/packagecheck?rev=60749&op=diff
==============================================================================
--- scripts/qa/packagecheck (original)
+++ scripts/qa/packagecheck Wed Jul 28 18:45:50 2010
@@ -40,8 +40,8 @@
 	echo "             update to ignore developer releases"
 	echo "  -C       - if -W is given, create debian/watch if it does not"
 	echo "             exist"
-	echo "  -R       - debian/rules: _r_mdir /usr/\{lib,share\}/perl5"
-	echo "             only if they exist"
+	echo "  -R       - debian/rules: _r_mdir /usr/\{lib,share\}/perl5 only if they exist;"
+	echo "             switch 'dh --with foo \$@' to 'dh \$@ --with foo'"
 	echo "  -Q       - add debian/README.source pointing to _Q_uilt's README.source"
 	echo "             if the package uses quilt"
 	echo "  -A       - all checks"
@@ -266,7 +266,7 @@
 	fi
 }
 
-testrmdir() {
+testrules() {
 	DIR=$1
 	PKG=$(basename $($CMD_REALPATH $DIR))
 	# handle rmdir /usr/{share,lib}/perl5
@@ -296,6 +296,15 @@
 			CHANGED=1
 		fi
 	fi
+
+	# switch dh --with foo $@ to dh $@ --with foo
+	if egrep "dh\s+\--with" $DIR/debian/rules ; then
+		echo "$PKG: trying to change order of dh arguments."
+		if perl -pi -e 's;dh\s+--with\s+(.+)\s+\$@;dh \$@ --with $1;g' $DIR/debian/rules ; then
+			MSG_RULES="debian/rules: switch order of arguments to dh." && \
+			CHANGED=1
+		fi
+	fi
 }
 
 testreadmesource() {
@@ -364,7 +373,7 @@
 			CREATE_WATCH=1
 			;;
 		R)
-			TESTRMDIR=1
+			TESTRULES=1
 			;;
 		Q)
 			TESTREADMESOURCE=1
@@ -376,7 +385,7 @@
 			TESTMISCDEPENDS=1
 			TESTPERLDEPENDS=1
 			TESTWATCHDIST=1
-			TESTRMDIR=1
+			TESTRULES=1
 			TESTREADMESOURCE=1
 			;;
 		h)
@@ -428,8 +437,9 @@
 	# TESTWATCHDIST - -W debian/_w_atch: change CPAN URLs to http://search.cpan.org/dist/Mod-Ule/
 	[ "$TESTWATCHDIST" = 1 ] && testwatchdist $p
 
-	# TESTRMDIR - -R debian/rules: _r_mdir /usr/\{lib,share\}/perl5 only if they exist
-	[ "$TESTRMDIR" = 1 ] && testrmdir $p
+	# TESTRULES - -R debian/rules: _r_mdir /usr/\{lib,share\}/perl5 only if they exist;
+	# switch dh --with foo $@ to dh @ --with foo
+	[ "$TESTRULES" = 1 ] && testrules $p
 
 	# TESTREADMESOURCE - -Q add debian/README.source for _Q_uilt-using packages
 	[ "$TESTREADMESOURCE" = 1 ] && testreadmesource $p




More information about the Pkg-perl-cvs-commits mailing list