Le 31/08/2026 à 00:07, gregor herrmann a écrit :
Package: devscripts
Version: 2.26.11
Severity: wishlist
X-Debbugs-Cc: [email protected]

[This is similar to #1123859 but concerns different aspects.]
Salut Xavier !

During the MiniDebConf Winterthur I looked again into uscan version 5
and the Metacpan templates, and there are two issues around versions
I noticed:

1) I remember that you already somewhere in the code strip the ^v from
    versions, which is great, but with --dehs they still appear:

Example: the ack package:

% uscan --report --dehs
Newest version of ack on remote site is 3.10.0, local version is 3.9.0
  => Newer package available from:
         => 
https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/ack-v3.10.0.tar.gz
<dehs>
<package>ack</package>
<debian-uversion>3.9.0</debian-uversion>
<debian-mangled-uversion>3.9.0</debian-mangled-uversion>
<upstream-version>3.10.0</upstream-version>
<upstream-url>https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/ack-v3.10.0.tar.gz</upstream-url>
<status>newer package available</status>
</dehs>

% uscan --update-watchfile

% uscan --report --dehs
Newest version of ack on remote site is v3.10.0, local version is 3.9.0
  => Newer package available from:
         => 
https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/ack-v3.10.0.tar.gz
<dehs>
<package>ack</package>
<debian-uversion>3.9.0</debian-uversion>
<debian-mangled-uversion>3.9.0</debian-mangled-uversion>
<upstream-version>v3.10.0</upstream-version>
<upstream-url>https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/ack-v3.10.0.tar.gz</upstream-url>
<status>newer package available</status>
</dehs>

Here the ^v is still there in the <upstream-version> tag. Do you
think it makes sense and is possible to get rid of it?


2) The other thing is development versions on the CPAN, i.e. versions
    containing an '_'. It seems that with version 4 they are ignored
    (good) -- maybe because the MetaCPAN website doesn't show them --,
    with version 5 they appear. (In version 3 we explicitly excluded
    them from the "default" regexp, IIRC.)

Example: the carton package:

% uscan --report --dehs
<dehs>
<package>carton</package>
<debian-uversion>1.0.35</debian-uversion>
<debian-mangled-uversion>1.0.35</debian-mangled-uversion>
<upstream-version>1.0.35</upstream-version>
<upstream-url>https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Carton-v1.0.35.tar.gz</upstream-url>
<status>up to date</status>
</dehs>

% uscan --update-watchfile

% uscan --report --dehs
Newest version of carton on remote site is v1.0.901, local version is 1.0.35
  => Newer package available from:
         => 
https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Carton-v1.0.901-TRIAL.tar.gz
<dehs>
<package>carton</package>
<debian-uversion>1.0.35</debian-uversion>
<debian-mangled-uversion>1.0.35</debian-mangled-uversion>
<upstream-version>v1.0.901</upstream-version>
<upstream-url>https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Carton-v1.0.901-TRIAL.tar.gz</upstream-url>
<status>newer package available</status>
</dehs>

Ehm, no, that's not the example with '_' but with '-TRIAL'. Also not
helpful but I guess that's a MetaCPAN API issue?


Here we go: the feersum package:

% uscan --report --dehs
<dehs>
<package>feersum</package>
<debian-uversion>1.505</debian-uversion>
<debian-mangled-uversion>1.505</debian-mangled-uversion>
<upstream-version>1.505</upstream-version>
<upstream-url>https://cpan.metacpan.org/authors/id/E/EG/EGOR/Feersum-1.505.tar.gz</upstream-url>
<status>up to date</status>
</dehs>

% uscan --update-watchfile

% uscan --report --dehs
Newest version of feersum on remote site is 1.506_61, local version is 1.505
  => Newer package available from:
         => 
https://cpan.metacpan.org/authors/id/E/EG/EGOR/Feersum-1.506_61.tar.gz
<dehs>
<package>feersum</package>
<debian-uversion>1.505</debian-uversion>
<debian-mangled-uversion>1.505</debian-mangled-uversion>
<upstream-version>1.506_61</upstream-version>
<upstream-url>https://cpan.metacpan.org/authors/id/E/EG/EGOR/Feersum-1.506_61.tar.gz</upstream-url>
<status>newer package available</status>
</dehs>


Would it be possible to ignore the "_" versions for the Metacpan
template / adjust the versions regex / the "versiontype" value there?


Cheers,
gregor



Hi Gregor,

I pushed a first draft to fix this:
https://salsa.debian.org/debian/devscripts/-/merge_requests/663

For the second part of the bug, the problem is in MetaCPAN::Client which drops the "-TRIAL" part. I added in this draft a "Maturity" option, default "release", to drop all non stable version. This is a different way than in other templates ("Version-Type: STABLE_VERSION" to choose version regex). Tell me if this way is OK for MetaCPAN or if you prefer the more standard (and more complex) way

Best regards,
Xavier

Reply via email to