r11496 - /scripts/qa/DebianQA/Watch.pm

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Sun Dec 23 09:28:50 UTC 2007


Author: tincho-guest
Date: Sun Dec 23 09:28:50 2007
New Revision: 11496

URL: http://svn.debian.org/wsvn/?sc=1&rev=11496
Log:
Changes needed to allow non-standard packages to be found -- more changes to come

Modified:
    scripts/qa/DebianQA/Watch.pm

Modified: scripts/qa/DebianQA/Watch.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Watch.pm?rev=11496&op=diff
==============================================================================
--- scripts/qa/DebianQA/Watch.pm (original)
+++ scripts/qa/DebianQA/Watch.pm Sun Dec 23 09:28:50 2007
@@ -282,13 +282,21 @@
     $dir =~ s/$cpanregex//i;
     $dir =~ s{^/+}{};
     debug("Looking for $dir + $filter into CPAN $type cache");
-    return ("NotFound") unless(exists($cpan->{$dir}));
+    #return ("NotFound") unless(exists($cpan->{$dir}));
+    # Allow this to gracefully degrade to a normal uscan check
+    return () unless(exists($cpan->{$dir}));
+
     my @res;
     foreach(keys %{$cpan->{$dir}}) {
         next unless ($_ =~ $filter);
         my $filt_ver = $1;
         my $cpan_ver = $cpan->{$dir}{$_}{version};
         if($filt_ver ne $cpan_ver) {
+            # Try to remove initial "v"s, if any
+            $filt_ver =~ s/^v//;
+            $cpan_ver =~ s/^v//;
+        }
+        if($filt_ver ne $cpan_ver) {
             warn("Version mismatch: uscan says $filt_ver, cpan says $cpan_ver");
             return ("VersionMismatch");
         }
@@ -296,12 +304,13 @@
             upstream_version => $cpan_ver,
             upstream_url => (
                 $type eq "dist" ?
-                "$base/CPAN/authors/id/" . $cpan->{dir}{$_}{author_path} :
+                "$base/CPAN/authors/id/" . $cpan->{$dir}{$_}{author_path} :
                 $origdir
             ) . "/$_"
         };
     }
-    return ("NotFound") unless(@res);
+    # Allow this to gracefully degrade to a normal uscan check
+    #return ("NotFound") unless(@res);
     return (undef, @res);
 }
 sub cpan_download(;$) {




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