[Dehs-devel] SVN devscripts commit: r438 - in trunk: . debian

Julian Gilbey jdg at costa.debian.org
Mon Aug 28 13:39:39 UTC 2006


Author: jdg
Date: 2006-08-28 13:39:38 +0000 (Mon, 28 Aug 2006)
New Revision: 438

Modified:
   trunk/debian/changelog
   trunk/uscan.1
   trunk/uscan.pl
Log:
* uscan: fix handling of recursive http URLs (Closes: #377518)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-08-28 13:04:13 UTC (rev 437)
+++ trunk/debian/changelog	2006-08-28 13:39:38 UTC (rev 438)
@@ -19,9 +19,10 @@
   * dpkg-genbuilddeps: clean up if statement (Closes: #365372)
   * nmudiff: stop using dpkg-parsechangelog to avoid barfing over broken
     changelogs (Closes: #374773)
+  * uscan: fix handling of recursive http URLs (Closes: #377518)
   * who-depends: convert output into locale charset (Closes: #384835)
 
- -- Julian Gilbey <jdg at debian.org>  Mon, 28 Aug 2006 14:04:03 +0100
+ -- Julian Gilbey <jdg at debian.org>  Mon, 28 Aug 2006 14:39:16 +0100
 
 devscripts (2.9.20) unstable; urgency=low
 

Modified: trunk/uscan.1
===================================================================
--- trunk/uscan.1	2006-08-28 13:04:13 UTC (rev 437)
+++ trunk/uscan.1	2006-08-28 13:39:38 UTC (rev 438)
@@ -61,6 +61,13 @@
 http://www.dataway.ch/~lukasl/amph/amph.html \\
   files/amphetamine-([\\d\\.]*).tar.bz2
 
+# This one shows that recursive directory scanning works, in either of
+# two forms, as long as the website can handle requests of the form
+# http://site/inter/mediate/dir/
+http://tmrc.mit.edu/mirror/twisted/Twisted/(\d\.\d)/ \\
+  Twisted-([\d\.]*)\.tar\.bz2
+http://tmrc.mit.edu/mirror/twisted/Twisted/(\d\.\d)/Twisted-([\d\.]*)\.tar\.bz2
+
 # If your package is located on sourceforge, use one of the following
 # formats to automatically use the qa.debian.org redirector, avoiding
 # SF's difficult mirror system.
@@ -89,15 +96,15 @@
 # The filename is found by taking the last component of the URL and
 # removing everything after any '?'.  If this would not make a usable
 # filename, use filenamemangle.  For example,
-# <A href="http://foo.bar.org/download/?path=&amp;download=foo-0.1.1.tar.gz">
+# <A href="http://foo.bar.org/download/?path=&download=foo-0.1.1.tar.gz">
 # could be handled as:
 # opts=filenamemangle=s/.*=(.*)/$1/ \\
-#     http://foo.bar.org/download/\\?path=&amp;download=foo-(.*)\\.tar\\.gz
+#     http://foo.bar.org/download/\\?path=&download=foo-(.*)\\.tar\\.gz
 # 
-# <A href="http://foo.bar.org/download/?path=&amp;download_version=0.1.1">
+# <A href="http://foo.bar.org/download/?path=&download_version=0.1.1">
 # could be handled as:
 # opts=filenamemangle=s/.*=(.*)/foo-$1\\.tar\\.gz/ \\
-#    http://foo.bar.org/download/\\?path=&amp;download_version=(.*)
+#    http://foo.bar.org/download/\\?path=&download_version=(.*)
 
 # The option downloadurlmangle can be used to mangle the URL of the file
 # to download.  This can only be used with http:// URLs.  This may be

Modified: trunk/uscan.pl
===================================================================
--- trunk/uscan.pl	2006-08-28 13:04:13 UTC (rev 437)
+++ trunk/uscan.pl	2006-08-28 13:39:38 UTC (rev 438)
@@ -1171,7 +1171,7 @@
 	    print STDERR "$progname debug: newest_dir => '$newest_dir'\n"
 		if $debug;
 	    if ($newest_dir ne '') {
-		$dir .= "$newest_dir/";
+		$dir .= "$newest_dir";
 	    }
 	    else {
 		return '';
@@ -1222,12 +1222,15 @@
 	    }
 	}
 	if (@hrefs) {
+	    @hrefs = Devscripts::Versort::versort(@hrefs);
 	    if ($debug) {
-		print "-- Found the following matching hrefs:\n";
+		print "-- Found the following matching hrefs (newest first):\n";
 		foreach my $href (@hrefs) { print "     $$href[1]\n"; }
 	    }
-	    @hrefs = Devscripts::Versort::versort(@hrefs);
-	    my ($newversion, $newdir) = @{$hrefs[0]};
+	    my $newdir = $hrefs[0][1];
+	    # just give the final directory component
+	    $newdir =~ s%/$%%;
+	    $newdir =~ s%^.*/%%;
 	    return $newdir;
 	} else {
 	    warn "$progname warning: In $watchfile,\n  no matching hrefs for pattern\n  $site$dir$pattern";




More information about the Dehs-devel mailing list