• uscan upstream version: padding zero to the left with elegance?

    From Julien Puydt@21:1/5 to All on Mon Sep 20 11:10:01 2021
    Hi,

    I'm having an issue with an upstream where the latest git tag is
    v2021.8.23 ; I would have liked them to (also) tag v2021.08.23, but
    that won't happen.

    So I need some uversionmangle magic.

    I know how to get the parts $1=2021, $2=8 and $3=23, but I don't know
    how to say $2 ($3 will need a similar adjustment) should be padded with
    zeros to the left for a length of two -- it *should* be pretty
    straightforward.

    I tried looking:
    - in the manpage for uscan ;
    - in uscan's source code ;
    - on codesearch for examples ;
    - on internet for perl examples ;
    but didn't find anything conclusive for use in a d/watch file.

    The exceedingly inelegant but working (as far as I know!) trick I came
    up with is:

    uversionmangle=s/v?([\d]+)\.([\d]+)\.([\d]+).*/$1.0$2.0$3/;s/([\d]+)\.[ \d]*(\d\d)\.[\d]*(\d\d)/$1.$2.$3/

    and I don't like it -- at all!

    Does someone have better?

    Cheers,

    J.Puydt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Markus Frosch@21:1/5 to Julien Puydt on Mon Sep 20 11:50:03 2021
    Hi Julien,

    On Mon, 2021-09-20 at 11:00 +0200, Julien Puydt wrote:
    I'm having an issue with an upstream where the latest git tag is
    v2021.8.23 ; I would have liked them to (also) tag v2021.08.23, but
    that won't happen.

    I would keep using the versioning style of upstream.

    dpkg and uscan should be pretty much fine with this:

    $ dpkg --compare-versions 2021.8.23 eq 2021.08.23; echo $?

    0

    Best Regards
    Markus Frosch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julien Puydt@21:1/5 to All on Mon Sep 20 11:50:02 2021
    Le lundi 20 septembre 2021 à 11:11 +0200, Markus Frosch a écrit :

    I would keep using the versioning style of upstream.

    dpkg and uscan should be pretty much fine with this:

    $ dpkg --compare-versions 2021.8.23 eq 2021.08.23; echo $?
    0

    Oh, you mean 2021.9.9 won't be seen as the last of the century?

    Cheers,

    J.Puydt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)