r5896 - /scripts/qa/versioncheck-html
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Thu Jul 19 14:28:01 UTC 2007
Author: dmn
Date: Thu Jul 19 14:28:01 2007
New Revision: 5896
URL: http://svn.debian.org/wsvn/?sc=1&rev=5896
Log:
Mangle the URLs from debian/watch to use the near CPAN mirror
Modified:
scripts/qa/versioncheck-html
Modified: scripts/qa/versioncheck-html
URL: http://svn.debian.org/wsvn/scripts/qa/versioncheck-html?rev=5896&op=diff
==============================================================================
--- scripts/qa/versioncheck-html (original)
+++ scripts/qa/versioncheck-html Thu Jul 19 14:28:01 2007
@@ -58,21 +58,29 @@
IN=$(grep "$P.*\.dsc" $DIR/incoming | perl -pe 's/.*_(.+)\.dsc.*/\1/')
NE=$(grep $P $DIR/newqueue | perl -pe "s/.*$P\s+([^\s]+)\s+source.*/\1/g")
+ # Get the watch file, mangling CPAN URLs to use
+ # our fast mirror
cat /dev/null > /$DIR/watch
- svn cat $REPO/$SECTION/${P}/trunk/debian/watch > $DIR/watch
+ svn cat $REPO/$SECTION/${P}/trunk/debian/watch \
+ | sed -e "s!^http://www.cpan.org/!$CPAN/!" \
+ | sed -e "s!^ftp://www.cpan.org/!$CPAN/!" \
+ | sed -e "s!^http://mirrors.kernel.org/cpan/!$CPAN/!" \
+ | sed -e "s!^ftp://mirrors.kernel.org/cpan/!$CPAN/!" \
+ > $DIR/watch
UPCUR=$(echo $RE | perl -pe 's/^(?:\d:)?(.+?)(?:-[^-]+)?$/\1/')
if [ -s $DIR/watch ]; then
if egrep -qi '^(ftp|http).+cpan' $DIR/watch; then
VER_REGEX=$(egrep '^http|^ftp' $DIR/watch | perl -pe 's{.+/}{}; s/\s.*$//')
if [ -n "$VER_REGEX" ]; then
UPNEW=$(perl -ne "if(/${VER_REGEX}/){ \$last_ver = \$1 if \$1 > \$last_ver; } END { print \$last_ver } " $DIR/cpan)
- if [ -z "$UPNEW" ]; then
- UPNEW="CPAN contains no /$VER_REGEX/"
- fi
else
UPNEW="Invalid debian/watch"
fi
- else
+ fi
+
+ # Either unknown watch URL or a module without
+ # meta-information; fall back to uscan
+ if [ -z "$UPNEW" ]; then
UPNEW=$(uscan --watchfile $DIR/watch --upstream-version $UPCUR --package $P --report-status | perl -ne 'print if s/Newest version on remote site is (.+),.*/\1/')
fi
else
@@ -93,7 +101,7 @@
[ -n "$NE" ] && echo "NEW: $NE"
echo "</td>"
if [ "$UPCUR" != "$UPNEW" ] ; then
- echo "<td>${UPNEW:-???}</td>"
+ echo "<td>${UPNEW:-No upstream sources!?}</td>"
else
echo "<td> </td>"
fi
More information about the Pkg-perl-cvs-commits
mailing list