Hi, Am Donnerstag, den 07.03.2013, 20:57 +0100 schrieb Markus Wanner: > Hi, > > fiddling with the watch file for 'asio', I recently found myself wanting > to check my uversionmangle pattern. However, uscan --debug didn't show > me the effects of my regexp. > > With the attached simple patch, uscan lists the mangled version > determined from the upstream file (in braces). Provided on a "works for > me" basis, not much testing performed.
I am fine with your patch except the output format. There is a cluttered column with the mangled version: $ uscan --verbose -- Scanning for watchfiles in . -- Found watchfile in ./debian -- In debian/watch, processing watchfile line: opts="uversionmangle=s/-beta//;s/\.?rc/~rc/" http://code.google.com/p/audacity/downloads/list?can=1&num=1000 .*/audacity-minsrc-(.+)\.tar\.bz2 -- Found the following matching hrefs: //audacity.googlecode.com/files/audacity-minsrc-1.3.10.tar.bz2 (1.3.10) //audacity.googlecode.com/files/audacity-minsrc-1.3.11.tar.bz2 (1.3.11) //audacity.googlecode.com/files/audacity-minsrc-1.3.12-beta.tar.bz2 (1.3.12) //audacity.googlecode.com/files/audacity-minsrc-1.3.13-beta.tar.bz2 (1.3.13) //audacity.googlecode.com/files/audacity-minsrc-1.3.14-beta.tar.bz2 (1.3.14) //audacity.googlecode.com/files/audacity-minsrc-1.3.7.tar.bz2 (1.3.7) //audacity.googlecode.com/files/audacity-minsrc-1.3.8.tar.bz2 (1.3.8) //audacity.googlecode.com/files/audacity-minsrc-1.3.9.tar.bz2 (1.3.9) //audacity.googlecode.com/files/audacity-minsrc-2.0.0.tar.bz2 (2.0.0) //audacity.googlecode.com/files/audacity-minsrc-2.0.1.tar.bz2 (2.0.1) //audacity.googlecode.com/files/audacity-minsrc-2.0.2.tar.bz2 (2.0.2) Newest version on remote site is 2.0.2, local version is 2.0.3 => remote site does not even have current version -- Scan finished I played with the format and put it at the beginning (patch attached): $ uscan --verbose -- Scanning for watchfiles in . -- Found watchfile in ./debian -- In debian/watch, processing watchfile line: opts="uversionmangle=s/-beta//;s/\.?rc/~rc/" http://code.google.com/p/audacity/downloads/list?can=1&num=1000 .*/audacity-minsrc-(.+)\.tar\.bz2 -- Found the following matching hrefs: 1.3.10 //audacity.googlecode.com/files/audacity-minsrc-1.3.10.tar.bz2 1.3.11 //audacity.googlecode.com/files/audacity-minsrc-1.3.11.tar.bz2 1.3.12 //audacity.googlecode.com/files/audacity-minsrc-1.3.12-beta.tar.bz2 1.3.13 //audacity.googlecode.com/files/audacity-minsrc-1.3.13-beta.tar.bz2 1.3.14 //audacity.googlecode.com/files/audacity-minsrc-1.3.14-beta.tar.bz2 1.3.7 //audacity.googlecode.com/files/audacity-minsrc-1.3.7.tar.bz2 1.3.8 //audacity.googlecode.com/files/audacity-minsrc-1.3.8.tar.bz2 1.3.9 //audacity.googlecode.com/files/audacity-minsrc-1.3.9.tar.bz2 2.0.0 //audacity.googlecode.com/files/audacity-minsrc-2.0.0.tar.bz2 2.0.1 //audacity.googlecode.com/files/audacity-minsrc-2.0.1.tar.bz2 2.0.2 //audacity.googlecode.com/files/audacity-minsrc-2.0.2.tar.bz2 Newest version on remote site is 2.0.2, local version is 2.0.3 => remote site does not even have current version -- Scan finished I am not happy with this format either. Any other opinions about the format? -- Benjamin Drung Debian & Ubuntu Developer
diff --git a/debian/changelog b/debian/changelog index e523126..2673081 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,9 @@ devscripts (2.13.1) UNRELEASED; urgency=low [ Dmitrijs Ledkovs ] * wrap-and-sort: Add trailing comma option (Closes: #703323). + [ Markus Wanner ] + * uscan: more debug info to allow checking uversionmangle patterns. + -- Benjamin Drung <[email protected]> Tue, 19 Feb 2013 17:22:32 +0100 devscripts (2.13.0) experimental; urgency=low diff --git a/scripts/uscan.pl b/scripts/uscan.pl index 8723fb4..c6b8efa 100755 --- a/scripts/uscan.pl +++ b/scripts/uscan.pl @@ -963,7 +963,7 @@ sub process_watchline ($$$$$$) if (@hrefs) { if ($verbose) { print "-- Found the following matching hrefs:\n"; - foreach my $href (@hrefs) { print " $$href[1]\n"; } + foreach my $href (@hrefs) { print " $$href[0]\t$$href[1]\n"; } } if (defined $download_version) { my @vhrefs = grep { $$_[0] eq $download_version } @hrefs; @@ -1060,7 +1060,7 @@ sub process_watchline ($$$$$$) if (@files) { if ($verbose) { print "-- Found the following matching files:\n"; - foreach my $file (@files) { print " $$file[1]\n"; } + foreach my $file (@files) { print " $$file[0]\t$$file[1]\n"; } } if (defined $download_version) { my @vfiles = grep { $$_[0] eq $download_version } @files; @@ -1588,7 +1588,7 @@ sub newest_dir ($$$$$) { @hrefs = Devscripts::Versort::versort(@hrefs); if ($debug) { print "-- Found the following matching hrefs (newest first):\n"; - foreach my $href (@hrefs) { print " $$href[1]\n"; } + foreach my $href (@hrefs) { print " $$href[0]\t$$href[1]\n"; } } my $newdir = $hrefs[0][1]; # just give the final directory component
_______________________________________________ devscripts-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
