Bug#869150: /usr/bin/uscan: doesn't find the correct version for directory based version detection
Paul Gevers
elbrus at debian.org
Thu Jul 20 23:30:35 UTC 2017
Package: devscripts
Version: 2.17.6
Severity: normal
File: /usr/bin/uscan
Recently I started improving the packaging of the festvox packages in
the tts team. Most of my upstream sources can be found by URL's like
http://festvox.org/packed/festival/2.4/voices/festvox_kallpc16k.tar.gz
The previous time that I worked on the packages, uscan didn't support
the version to originate from the diretory tree. Luckily, it now does,
but it seems to be processing the version in a weird way. With the
attached (and uploaded) watch file for festlex-cmu, uscan reports that
there is a version 4 available, while the version it found is 2.4. Also
running "uscan -v" before the changelog was updated showed the wrong
behavior.
I don't know enough perl to know how to do it, but I think that the
expression for the version in the next line isn't greedy (I found this
on line 3293 in the version in stretch):
# uversionmanglesd version is '', make best effort to set it
$newfile_base =~
m/^.+[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?:\.tar\.(gz|bz2|xz)|\.zip)$/i;
$newversion = $1;
^^^^^^^^^^^^^^^^^^^^^^^
paul at testavoira ~/packages/a11y/festvox-rablpc16k $ uscan -v
uscan info: uscan (version 2.17.6) See uscan(1) for help
uscan info: Scan watch files in .
uscan info: Check debian/watch and debian/changelog in .
uscan info: package="festvox-rablpc16k" version="1.4.0-3" (as seen in
debian/changelog)
uscan info: package="festvox-rablpc16k" version="1.4.0" (no epoch/revision)
uscan info: Check debian/watch and debian/changelog in ./.git/refs/tags
uscan info: Check debian/watch and debian/changelog in
./.git/dgit/unpack/festvox-rablpc16k-1.4.0
uscan info: ./debian/changelog sets package="festvox-rablpc16k"
version="1.4.0"
uscan info: Process ./debian/watch (package=festvox-rablpc16k version=1.4.0)
uscan info: opts:
filenamemangle=s#.*/festival/[-_]?(\d[\-+\.:\~\da-zA-Z]*)/voices/festvox_rablpc16k#festvox-rablpc16k_$1#
uscan info: line:
http://festvox.org/packed/festival/[-_]?(\d[\-+\.:\~\da-zA-Z]*)/voices/
festvox_rablpc16k(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)
uscan info: Parsing
filenamemangle=s#.*/festival/[-_]?(\d[\-+\.:\~\da-zA-Z]*)/voices/festvox_rablpc16k#festvox-rablpc16k_$1#
uscan info: line:
http://festvox.org/packed/festival/[-_]?(\d[\-+\.:\~\da-zA-Z]*)/voices/
festvox_rablpc16k(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)
uscan info: Last orig.tar.* tarball version (from debian/changelog): 1.4.0
uscan info: Last orig.tar.* tarball version (dversionmangled): 1.4.0
uscan info: dir=>/packed/festival/ dirpattern=>[-_]?(\d[\-+\.:\~\da-zA-Z]*)
uscan info: Requesting URL:
http://festvox.org/packed/festival/
uscan info: Matching pattern:
(?:(?:http://festvox.org)?\/packed\/festival\/)?[-_]?(\d[\-+\.:\~\da-zA-Z]*)
uscan info: Matching target for dirversionmangle: ?C=N;O=D
uscan info: Matching target for dirversionmangle: ?C=M;O=A
uscan info: Matching target for dirversionmangle: ?C=S;O=A
uscan info: Matching target for dirversionmangle: ?C=D;O=A
uscan info: Matching target for dirversionmangle: /packed/
uscan info: Matching target for dirversionmangle: 1.4.1/
uscan info: Matching target for dirversionmangle: 1.4.2/
uscan info: Matching target for dirversionmangle: 1.4.3/
uscan info: Matching target for dirversionmangle: 1.95/
uscan info: Matching target for dirversionmangle: 1.96/
uscan info: Matching target for dirversionmangle: 2.0.95/
uscan info: Matching target for dirversionmangle: 2.1/
uscan info: Matching target for dirversionmangle: 2.4/
uscan info: Matching target for dirversionmangle: Linux-1.4.1/
uscan info: Matching target for dirversionmangle: Linux-1.4.2/
uscan info: Matching target for dirversionmangle: free-1.4.1/
uscan info: Matching target for dirversionmangle: free-1.4.2/
uscan info: Matching target for dirversionmangle: free-1.4.3/
uscan info: Matching target for dirversionmangle: latest/
uscan info: Found the following matching directories (newest first):
2.4/ (2.4)
2.1/ (2.1)
2.0.95/ (2.0.95)
1.96/ (1.96)
1.95/ (1.95)
1.4.3/ (1.4.3)
1.4.2/ (1.4.2)
1.4.1/ (1.4.1)
uscan info: newest_dir => '2.4'
uscan info: Requesting URL:
http://festvox.org/packed/festival/2.4/voices/
uscan info: Matching pattern:
(?:(?:http://festvox.org)?\/packed\/festival\/2\.4\/voices\/)?festvox_rablpc16k(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)
uscan info: Found the following matching hrefs on the web page (newest
first):
festvox_rablpc16k.tar.gz () index=-1
uscan info: Matching target for downloadurlmangle:
http://festvox.org/packed/festival/2.4/voices/festvox_rablpc16k.tar.gz
uscan info: Upstream URL (downloadurlmangled):
http://festvox.org/packed/festival/2.4/voices/festvox_rablpc16k.tar.gz
uscan info: Matching target for filenamemangle:
http://festvox.org/packed/festival/2.4/voices/festvox_rablpc16k.tar.gz
uscan info: Newest upstream tarball version from the filenamemangled
filename: 4
uscan info: Download filename (filenamemangled):
festvox-rablpc16k_2.4.tar.gz
uscan: Newest version of festvox-rablpc16k on remote site is 4, local
version is 1.4.0
uscan: => Newer package available from
http://festvox.org/packed/festival/2.4/voices/festvox_rablpc16k.tar.gz
uscan info: Downloading upstream package: festvox-rablpc16k_2.4.tar.gz
uscan info: Requesting URL:
http://festvox.org/packed/festival/2.4/voices/festvox_rablpc16k.tar.gz
uscan info: Successfully downloaded package: festvox-rablpc16k_2.4.tar.gz
uscan info: Start checking for common possible upstream OpenPGP
signature files
uscan info: End checking for common possible upstream OpenPGP signature
files
uscan info: Missing OpenPGP signature.
uscan info: New orig.tar.* tarball version (oversionmangled): 4
uscan info: Executing internal command:
mk-origtargz --package festvox-rablpc16k --version 4 --compression
gzip --directory .. --copyright-file debian/copyright
../festvox-rablpc16k_2.4.tar.gz
uscan info: New orig.tar.* tarball version (after mk-origtargz): 4
uscan info: Successfully symlinked ../festvox-rablpc16k_2.4.tar.gz to
../festvox-rablpc16k_4.orig.tar.gz.
uscan info: Scan finished
- -- System Information:
Debian Release: 9.0
APT prefers stable-debug
APT policy: (500, 'stable-debug'), (500, 'stable'), (200, 'stable'),
(50, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages devscripts depends on:
ii dpkg-dev 1.18.24
ii libc6 2.24-11+deb9u1
ii libfile-homedir-perl 1.00-1
ii perl 5.24.1-3
ii python3 3.5.3-1
Versions of packages devscripts recommends:
ii apt 1.4.6
ii at 3.1.20-3
ii curl 7.52.1-5
ii dctrl-tools 2.24-2+b1
ii debian-keyring 2017.05.28
ii dput-ng [dput] 1.13
ii equivs 2.0.9+nmu1
ii fakeroot 1.21-3.1
ii file 1:5.30-1
ii gnupg 2.1.18-6
ii gnupg2 2.1.18-6
ii libdistro-info-perl 0.14
ii libdpkg-perl 1.18.24
ii libencode-locale-perl 1.05-1
ii libgit-wrapper-perl 0.047-1
ii liblist-compare-perl 0.53-1
ii liblwp-protocol-https-perl 6.06-2
ii libsoap-lite-perl 1.20-1
ii liburi-perl 1.71-1
ii libwww-perl 6.15-1
ii licensecheck 3.0.29-1
ii lintian 2.5.50.4
ii man-db 2.7.6.1-2
ii patch 2.7.5-1+b2
ii patchutils 0.3.4-2
ii python3-debian 0.1.30
ii python3-magic 1:5.30-1
ii sensible-utils 0.0.9
ii strace 4.15-2
ii unzip 6.0-21
ii wdiff 1.2.2-2
ii wget 1.18-5
ii xz-utils 5.2.2-1.2+b1
Versions of packages devscripts suggests:
pn adequate <none>
ii autopkgtest 4.4
pn bls-standalone <none>
ii build-essential 12.3
pn check-all-the-things <none>
pn cvs-buildpackage <none>
pn devscripts-el <none>
pn diffoscope <none>
pn disorderfs <none>
pn dose-extra <none>
pn duck <none>
pn faketime <none>
pn gnuplot <none>
ii gpgv 2.1.18-6
pn how-can-i-help <none>
ii libauthen-sasl-perl 2.1600-1
ii libfile-desktopentry-perl 0.22-1
ii libnet-smtps-perl 0.04-1
pn libterm-size-perl <none>
ii libtimedate-perl 2.3000-2
ii libyaml-syck-perl 1.29-1+b2
ii mailutils [mailx] 1:3.1.1-1
pn mozilla-devscripts <none>
pn mutt <none>
ii openssh-client [ssh-client] 1:7.4p1-10
pn piuparts <none>
pn ratt <none>
pn reprotest <none>
pn svn-buildpackage <none>
pn w3m <none>
- -- no debconf information
-------------- next part --------------
version=4
# Note that a "new" version doesn't seem to imply new content.
opts="filenamemangle=s#.*/festival/@ANY_VERSION@/festlex_CMU#@PACKAGE at _$1#" \
http://festvox.org/packed/festival/@ANY_VERSION@/ festlex_CMU at ARCHIVE_EXT@
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20170720/c60a2654/attachment.sig>
More information about the devscripts-devel
mailing list