r7934 - /scripts/qa/packagecheck

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Tue Sep 25 17:03:09 UTC 2007


Author: gregoa-guest
Date: Tue Sep 25 17:03:08 2007
New Revision: 7934

URL: http://svn.debian.org/wsvn/?sc=1&rev=7934
Log:
Improve guessing of module name for contructing the upstream URL

Modified:
    scripts/qa/packagecheck

Modified: scripts/qa/packagecheck
URL: http://svn.debian.org/wsvn/scripts/qa/packagecheck?rev=7934&op=diff
==============================================================================
--- scripts/qa/packagecheck (original)
+++ scripts/qa/packagecheck Tue Sep 25 17:03:08 2007
@@ -55,11 +55,14 @@
 		echo "$p: trying to add missing Homepage field to source stanza"
 		
 		# try to construct canonical URL
+		if [ -e 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 [ -e trunk/$p/Makefile.PL ]; then 
-			PERLNAME=$(perl -n -e "print if s;^.*NAME.*=>.*'([a-zA-Z:]+)'.*\$;\$1;" trunk/$p/Makefile.PL | sed -e 's/::/-/g' | head -n 1)
+			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 [ -e trunk/$p/Build.PL ]; then 
-			PERLNAME=$(perl -n -e "print if s;^.*module_name.*=>.*'([a-zA-Z:]+)'.*\$;\$1;" trunk/$p/Build.PL | sed -e 's/::/-/g' | head -n 1)
+		if [ -e 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
 			NEWHP="http://search.cpan.org/dist/$PERLNAME"




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