[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MetaCPAN vs. uscan



On Fri, 11 Jul 2025 15:19:54 +0200, Yadd wrote:

Hacking the JS looks difficult and unstable (such script may change often). I think the best is to transform inside uscan

 https://metacpan.org/release/The::Lib  ; \
   .*/The-Lib-v?@ANY_VERSION@@ARCHIVE_EXT@$

s/The::Lib/The-Lib/ # or both, and maybe we find other URLs as well

into

 opts=\
 archmode=plain,\
 downloadurlmangle=s/^.*?\s*"download_url"\s*:\s*"//;s/"\s*$// \
 https://fastapi.metacpan.org/v1/release/The-Lib \
 "download_url"\s*:\s*".*The-Lib-v?@ANY_VERSION@@ARCHIVE_EXT@

That would be great, thank you!

In a previous MR (never reviewed...), I replaced uscan-v4 files by a new version 5 of debian/watch. Then it was possible to define "macros". Example:

 Version: 5
  Template: GitHub
 Author: yadd
 Project: my-project

Of course, uscan was still able to read version 4 (on-the-fly transformation). The adopted format was the common RFC-822 like style.

Then it could have been very easy to define "Metacpan" macro and then adapt such changes automatically.

Sounds also interesting but more for the middle to long term.

Maybe Brest could be a good place to talk about this

Totally.


Cheers,
gregor

--
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`-

Attachment: signature.asc
Description: Digital Signature


Reply to: