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

Re: MetaCPAN vs. uscan



Oups sorry, here is the whole proposition for the list

On 7/11/25 14:43, gregor herrmann wrote:
Should this mail have gone to the list? If yes I can bounce and reply there :)
In any case: Sounds good, thanks!


Cheers,
gregor

On Fri, 11 Jul 2025 13:41:04 +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@$

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@


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.

Maybe Brest could be a good place to talk about this

Ref: https://salsa.debian.org/debian/devscripts/-/merge_requests/251


Reply to: