[SCM] Git repository for devscripts branch, master, updated. v2.11.7-53-gb3322e6

Benjamin Drung bdrung at debian.org
Thu May 31 14:58:36 UTC 2012


The following commit has been merged in the master branch:
commit d96fabf16d7adc902c778a975217471b318f040b
Author: Scott Moser <smoser at ubuntu.com>
Date:   Thu May 31 16:55:19 2012 +0200

    uscan: Support watch files that reference S3 bucket listings.
    
    There is very little chance for false positives, and the content that is
    found in s3 bucket listings is well defined so it is not likely to stop
    working.  Before considering the content to be an S3 bucket listing, it
    checks:
     a.) that the file begins with "<?xml"
     b.) that it contains the string
         'xmlns=http://s3.amazonaws.com/doc/2006-03-01/'
    
    Closes: #630756
    LP: #798293
    Signed-off-by: Benjamin Drung <bdrung at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 3c748a5..1535523 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -64,6 +64,10 @@ devscripts (2.11.8) UNRELEASED; urgency=low
   * debuild: Do not warn for missing upstream tarball if package is source
     format 3.0 (git). (Closes: #668372)
 
+  [ Scott Moser ]
+  * uscan: Support watch files that reference S3 bucket listings.
+    (Closes: #630756, LP: #798293)
+
  -- Benjamin Drung <bdrung at debian.org>  Mon, 28 May 2012 17:14:12 +0200
 
 devscripts (2.11.7) unstable; urgency=low
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 3b325a5..df4fea9 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -902,6 +902,15 @@ sub process_watchline ($$$$$$)
 	my $content = $response->content;
 	print STDERR "$progname debug: received content:\n$content\[End of received content]\n"
 	    if $debug;
+
+	if ($content =~ m%^<[?]xml%i &&
+	    $content =~ m%xmlns="http://s3.amazonaws.com/doc/2006-03-01/"%) {
+	    # this is an S3 bucket listing.  Insert an 'a href' tag
+	    # into the content for each 'Key', so that it looks like html (LP: #798293)
+	    print STDERR "$progname debug: fixing s3 listing\n" if $debug;
+	    $content =~ s%<Key>([^<]*)</Key>%<Key><a href="$1">$1</a></Key>%g
+	}
+
 	# We need this horrid stuff to handle href=foo type
 	# links.  OK, bad HTML, but we have to handle it nonetheless.
 	# It's bug #89749.

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list