r8139 - /scripts/qa/packagecheck

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Tue Oct 9 18:01:14 UTC 2007


Author: gregoa-guest
Date: Tue Oct  9 18:01:13 2007
New Revision: 8139

URL: http://svn.debian.org/wsvn/?sc=1&rev=8139
Log:
only contruct new Homepage if old Homepage is either empty or old Homepage contains cpan; IOW: try to preserver 'real' old Homepage

Modified:
    scripts/qa/packagecheck

Modified: scripts/qa/packagecheck
URL: http://svn.debian.org/wsvn/scripts/qa/packagecheck?rev=8139&op=diff
==============================================================================
--- scripts/qa/packagecheck (original)
+++ scripts/qa/packagecheck Tue Oct  9 18:01:13 2007
@@ -68,24 +68,28 @@
 	if ! egrep "^Homepage: " $TRUNK/$p/debian/control > /dev/null; then
 		echo "$p: trying to add missing Homepage field to source stanza"
 		
-		# try to construct canonical URL
-		if [ -s $TRUNK/$p/Build.PL ]; then 
-			PERLNAME=$(perl -n -e "print if s;^.*module_name.*=>.*['\"[]([a-zA-Z0-9:_-]+)[]'\"].*\$;\$1;" $TRUNK/$p/Build.PL | sed -e 's/::/-/g' | head -n 1)
-		fi
-		if [ -s $TRUNK/$p/Makefile.PL ]; then 
-			PERLNAME=$(perl -n -e "print if s;^.*(?:DIST)?NAME.*=>.*['\"[]([a-zA-Z0-9:_-]+)[]'\"].*\$;\$1;" $TRUNK/$p/Makefile.PL | sed -e 's/::/-/g' | head -n 1)
-		fi
-		if [ -s $TRUNK/$p/META.yml ]; then 
-			PERLNAME=$(perl -n -e "print if s;^name:.* ([a-zA-Z0-9:_-]+).*\$;\$1;" $TRUNK/$p/META.yml | head -n 1)
-		fi
-		if [ -n "$PERLNAME" ]; then
-			if curl --silent http://search.cpan.org/dist/$PERLNAME/ grep '<title>.*</title>' | grep --silent $PERLNAME; then
-				NEWHP="http://search.cpan.org/dist/$PERLNAME/"
+		# only construct new URL if we don't have a "real one"
+		if [ -z "$NEWHP" ] || echo "$NEWHP" | grep cpan\.org > /dev/null; then
+			# try to construct canonical URL
+			if [ -s $TRUNK/$p/Build.PL ]; then 
+				PERLNAME=$(perl -n -e "print if s;^.*module_name.*=>.*['\"[]([a-zA-Z0-9:_-]+)[]'\"].*\$;\$1;" $TRUNK/$p/Build.PL | sed -e 's/::/-/g' | head -n 1)
 			fi
+			if [ -s $TRUNK/$p/Makefile.PL ]; then 
+				PERLNAME=$(perl -n -e "print if s;^.*(?:DIST)?NAME.*=>.*['\"[]([a-zA-Z0-9:_-]+)[]'\"].*\$;\$1;" $TRUNK/$p/Makefile.PL | sed -e 's/::/-/g' | head -n 1)
+			fi
+			if [ -s $TRUNK/$p/META.yml ]; then 
+				PERLNAME=$(perl -n -e "print if s;^name:.* ([a-zA-Z0-9:_-]+).*\$;\$1;" $TRUNK/$p/META.yml | head -n 1)
+			fi
+			if [ -n "$PERLNAME" ]; then
+				if curl --silent http://search.cpan.org/dist/$PERLNAME/ grep '<title>.*</title>' | grep --silent $PERLNAME; then
+					NEWHP="http://search.cpan.org/dist/$PERLNAME/"
+				fi
+			fi
+			
+			# get NEWHP from somewhere else? debian/watch? debian/copyright?
+
 		fi
 		
-		# get NEWHP from somewhere else? debian/watch? debian/copyright?
-
 		if [ -n "$NEWHP" ]; then
 			perl -pi -e "s;(Standards-Version:.+);\$1\nHomepage: $NEWHP;" $TRUNK/$p/debian/control
 			MSGADD="${MSGADD:+$MSGADD; }Homepage field (source stanza)"




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