Re: git: 11e51925413b - main - devel/p5-DateTime-Format-MySQL: Update to 0.08

From: Po-Chuan Hsieh <sunpoet_at_freebsd.org>
Date: Tue, 22 Aug 2023 16:57:51 UTC
On Wed, Aug 23, 2023 at 12:19 AM Rodrigo Osorio <rodrigo@freebsd.org> wrote:

> On 21/08/23 20:11, Po-Chuan Hsieh wrote:
>
> On Sat, Aug 19, 2023 at 3:59 AM Joseph Mingrone <jrm@freebsd.org> wrote:
>
>> On Fri, 2023-08-18 at 16:08, Renato Botelho <garga@FreeBSD.org>
>> <garga@FreeBSD.org> wrote:
>>
>> > On 18/08/23 15:52, Joseph Mingrone wrote:
>> >> On Fri, 2023-08-18 at 14:32, Renato Botelho <garga@FreeBSD.org>
>> <garga@FreeBSD.org> wrote:
>>
>> >>> On 17/08/23 10:37, Joseph Mingrone wrote:
>> >>>> On Thu, 2023-08-17 at 10:15, Renato Botelho <garga@FreeBSD.org>
>> <garga@FreeBSD.org> wrote:
>>
>> >>>>> On 16/08/23 15:36, Po-Chuan Hsieh wrote:
>> >>>>>> The branch main has been updated by sunpoet:
>> >>>>>> URL:
>> https://cgit.FreeBSD.org/ports/commit/?id=11e51925413b7090544d4a4ac449c364717f7e50
>> >>>>>> commit 11e51925413b7090544d4a4ac449c364717f7e50
>> >>>>>> Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
>> <sunpoet@FreeBSD.org>
>> >>>>>> AuthorDate: 2023-08-16 18:16:29 +0000
>> >>>>>> Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
>> <sunpoet@FreeBSD.org>
>> >>>>>> CommitDate: 2023-08-16 18:26:21 +0000
>> >>>>>>        devel/p5-DateTime-Format-MySQL: Update to 0.08
>> >>>>>>             Changes:
>> https://metacpan.org/dist/DateTime-Format-MySQL/changes
>> >>>>>> ---
>> >>>>>>     devel/p5-DateTime-Format-MySQL/Makefile | 2 +-
>> >>>>>>     devel/p5-DateTime-Format-MySQL/distinfo | 6 +++---
>> >>>>>>     2 files changed, 4 insertions(+), 4 deletions(-)
>> >>>>>> diff --git a/devel/p5-DateTime-Format-MySQL/Makefile
>> b/devel/p5-DateTime-Format-MySQL/Makefile
>> >>>>>> index 989d481a74d2..f9b0e03be278 100644
>> >>>>>> --- a/devel/p5-DateTime-Format-MySQL/Makefile
>> >>>>>> +++ b/devel/p5-DateTime-Format-MySQL/Makefile
>> >>>>>> @@ -1,5 +1,5 @@
>> >>>>>>     PORTNAME=    DateTime-Format-MySQL
>> >>>>>> -PORTVERSION=    0.0701
>> >>>>>> +PORTVERSION=    0.08
>>
>> >>>>> Hello Po-Chuan!
>>
>> >>>>> 0.08 is smaller than 0.0701 so port version went backwards after
>> this change.
>> >>>> 0.08 is greater than 0.0701, but not according to pkg version.
>> >>>>    % pkg version -t 0.08 0.0701
>> >>>>           <
>>
>> >>> Actually pkg is correct in this case.  Numerically 8 is smaller than
>> 701.  I tested it on Ubuntu and dpkg --compare-versions has the same
>> result, and I believe any other package management tool will do.
>>
>> >>> What seems to be wrong is the version schema used by this project.
>> It should be 0.0800 instead of 0.08.
>> >> I didn't mean to suggest that pkg is wrong, but just pointing out that
>> numerically, 0.08, which is equal to 0.0800, is greater than 0.0701.  This
>> could be a source of confusion for anyone who assumes that the comparison
>> of version numbers works the same as comparisons of
>> >> real numbers.
>>
>> > Anyway, can you please fix the port by adding PORTEPOCH?
>>
>> Fixed in 49eb4309189da197f55dee54f8efb5e875f2daaa.  Thanks for reporting.
>>
>> Joe
>>
>
> No doubt 0.08 is less than 0.0701 in the pkg world.
> Thank you all for fixing it.
>
> We don't know if the versioning change is temporary or not. Instead of
> adding PORTEPOCH, please consider the following fix/hack next time.
> Thanks again.
>
> --- a/devel/p5-DateTime-Format-MySQL/Makefile
> +++ b/devel/p5-DateTime-Format-MySQL/Makefile
> @@ -1,8 +1,9 @@
>  PORTNAME=      DateTime-Format-MySQL
> -PORTVERSION=   0.08
> +PORTVERSION=   0.0800
>  CATEGORIES=    devel perl5
>  MASTER_SITES=  CPAN
>  PKGNAMEPREFIX= p5-
> +DISTNAME=      DateTime-Format-MySQL-${PORTVERSION:C|00$||}
>
>  MAINTAINER=    perl@FreeBSD.org
>  COMMENT=       Parse and format MySQL dates and times
>
>
> Hi,
>
> I don't know if such a simple fix can solve the issue we have with Perl
> versioning sheme
> and the semantic versioning scheme we use in ports.
> This article is very instructive about how awful it is
> https://perlhacks.com/2016/12/version-numbers/.
>

Yes, Perl has a different versioning scheme.
That's why I would hack PORTVERSION sometimes.
Take textproc/p5-Text-ANSI-Util for example, I removed the hack after years
since the version scheme seems to be consolidated.
c975054b7866b05594a1b6be9cea3c33870d8567
11cb372ff4cae86977fe2f873b630825b8cd43a0

Just a few examples running this command to evaluate the version number:
>     perl -Mversion -E"say version->parse('$VERSION')->normal"
>
> VERSION    | Output
> -----------|-------
> "8"        | v8.0.0
> "00008"    | v8.0.0
> "000080"   | v80.0.0
> "0.8"      | v0.800.0
> "0.81"     | v0.810.0
> "0.801"    | v0.801.0
> "0.8001"   | v0.800.100
> "0.008001" | v0.8.1
>
> By the way, I did a quick try in with your fix, and the substitution with
> an '$'
> doesn't seem to work in BSD makefiles.
>
> %cat Makefile
> V="0.0800"
>
You have to remove the double quote.

> all:
>     @echo ${V}
>     @echo ${V:C|00$||}
>
> %make
> 0.0800
> 0.0800
>
> Regards
> -- rodrigo
>