- Package:
- devscripts
- Source:
- devscripts
- Description:
- scripts to make the life of a Debian Package maintainer easier
- Submitter:
- Sébastien Villemot
- Date:
- 2026-10-06 03:29:02 UTC
- Severity:
- normal
Dear Maintainer,
I’ve tried to use the Metacpan template for the libfinance-quote-perl package,
using the following minimal debian/watch:
Version: 5
Template: Metacpan
Dist: Finance::Quote
But uscan then returns an incorrect (and nonexistent) version. Here is an exceprt:
uscan info: Scan watch files in .
uscan info: Check debian/watch and debian/changelog in .
uscan info: package="libfinance-quote-perl" version="1.71-1" (as seen in debian/changelog)
uscan info: package="libfinance-quote-perl" version="1.71" (no epoch/revision)
uscan info: ./debian/changelog sets package="libfinance-quote-perl" version="1.71"
uscan info: Process watch file at: debian/watch
package = libfinance-quote-perl
version = 1.71
pkg_dir = .
uscan info: Parsing mode: metacpan
uscan info: Parsing pgpmode: none
uscan info: Parsing uversionmangle: s/\d\K[_.+-]?((?i)dev|pre|alpha|beta|rc)[.-]?/~$1/
uscan info: Parsing versiontype: (?:[-_]?[Vv]?(\d[\-+\.:\~\da-zA-Z]*))
uscan info: Last orig.tar.* tarball version (from debian/changelog): 1.71
uscan info: Last orig.tar.* tarball version (dversionmangled): 1.71
uscan info: Searching versions of Finance-Quote
uscan info: Found the following matching files on the web page (newest first):
https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.5402.tar.gz (1.5402) index=1.5402-1
https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.5401.tar.gz (1.5401) index=1.5401-1
https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.5301.tar.gz (1.5301) index=1.5301-1
https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.71.tar.gz (1.71) index=1.71-1
https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.70.tar.gz (1.70) index=1.70-1
https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.69.tar.gz (1.69) index=1.69-1
https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.68.tar.gz (1.68) index=1.68-1
[…]
https://cpan.metacpan.org/authors/id/P/PJ/PJF/Finance-Quote-1.04.tar.gz (1.04) index=1.04-1
uscan info: uscan parser results:
$base = Finance-Quote
$filepattern = https://cpan.metacpan.org/.*Finance-Quote-(?:[-_]?[Vv]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|tar\.zstd?|zip|tgz|tbz|txz))
$newfile = https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.5402.tar.gz
$mangled_newversion = 1.5402
$newversion = 1.5402
$lastversion = 1.71
uscan info: Upstream URL(+tag) to download is identified as https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.5402.tar.gz
uscan info: Filename (filenamemangled) for downloaded file: Finance-Quote-1.5402.tar.gz
Newest version of libfinance-quote-perl on remote site is 1.5402, local version is 1.71
=> Newer package available from:
=> https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.5402.tar.gz
uscan info: Scan finished
As you can see, it detects 1.5402 as being the most recent version, instead of
the correct 1.71 (since 1.5402 > 1.71 using standard version ordering rules).
I reported this problem to upstream and to CPAN people, see this GitHub issue:
https://github.com/metacpan/metacpan-web/issues/3735
Apparently this is related to a so-called Backpan directory, which keeps old
deleted versions. Several suggestions were made in the GitHub issue on how to
fix this in uscan, and some additional unrelated issues were also reported. I
copy the relevant comments here for completeness:
Thanks for your work,
My first time submitting a merge request
(https://salsa.debian.org/debian/devscripts/-/merge_requests/666). I
believe the build failure is unrelated to my change.
That said, here is the block of code that contains my changes. Added "{
authorized => 'true' }" to the filters, and "not => [{ status =>
'backpan' }]," to the $mcpan->release call to retrieve release
information from CPAN.
# By default, skip developer releases (versions with a "_",
archives with a
# "-TRIAL" suffix, ...): they aren't meant to be packaged
my @filters = ({ distribution => $dist });
push @filters, { maturity => $maturity } unless $maturity eq 'any';
# We only want "authorized" releases/uploads
push @filters, { authorized => 'true' };
my $mcpan = MetaCPAN::Client->new;
# Skip releases in "BackPAN"
my $releases = $mcpan->release({
all => \@filters,
not => [{ status => 'backpan' }],
fields => [qw(name version maturity download_url)] });
I hope this helps.
Bruce S.
Sébastien, Being a newbie at submitting merge requests for official Debian packages, I didn't realize that in the Devscripts package perltidy is used to enforce formatting style. With that I submitted a new merge request that passes the pipeline build. https://salsa.debian.org/debian/devscripts/-/merge_requests/668 Bruce S