r6177 - /scripts/qa/versioncheck.pl

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Tue Jul 31 10:52:59 UTC 2007


Author: dmn
Date: Tue Jul 31 10:52:58 2007
New Revision: 6177

URL: http://svn.debian.org/wsvn/?sc=1&rev=6177
Log:
When searching upstream, search for HTML links; support QA sf.net redirector

Modified:
    scripts/qa/versioncheck.pl

Modified: scripts/qa/versioncheck.pl
URL: http://svn.debian.org/wsvn/scripts/qa/versioncheck.pl?rev=6177&op=diff
==============================================================================
--- scripts/qa/versioncheck.pl (original)
+++ scripts/qa/versioncheck.pl Tue Jul 31 10:52:58 2007
@@ -273,6 +273,7 @@
     foreach(@$watch)
     {
         my( $wline, $opts ) = @$_;
+        $wline =~ s{^http://sf\.net/}{http://qa.debian.org/watch/sf.php/};
         if( $wline =~ m{
                 ^((?:http|ftp)://\S*?)  # http://server/some/path - captured
                                         #  non-greedy to not eat up the pattern
@@ -287,7 +288,12 @@
             my $page_io = IO::Scalar->new(\$page);
             while( <$page_io> )
             {
-                push @vers, $1 if $_ =~ $filter;
+                #warn $_ if $_ =~ $filter;
+                while( s/<a [^>]*href="([^"]+)"[^>]*>// )
+                {
+                    my $href = $1;
+                    push @vers, $1 if $href =~ $filter;
+                }
             }
         }
         else




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