GNU bug report logs - #60725
support the special '~' character in our version parser

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Wed, 11 Jan 2023 03:24:01 UTC

Severity: normal

To reply to this bug, email your comments to 60725 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#60725; Package guix. (Wed, 11 Jan 2023 03:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 11 Jan 2023 03:24:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: guix lint thinks 2019111-0.7e76d75 is older than 20191111
Date: Tue, 10 Jan 2023 22:23:48 -0500
Hi Guix,

If you run 'guix lint emacs-enh-ruby-mode', it'll print this:

--8<---------------cut here---------------start------------->8---
emacs-enh-ruby-mode <at> 2019111-0.7e76d75: can be upgraded to 20191111
--8<---------------cut here---------------end--------------->8---

That's wrong; it should know that something that starts with the tag and
has trailing characters is considered newer.  Actually, it should
probably implement the RPM scheme used in Debian also, so that an RC can
be understood as older than the final release.  The scheme uses the
tilde character (~) as a way to specify that the version is lower than
the number that precedes the tilde.

See the test case here for a "specification" (there may be a better
place):
https://github.com/rpm-software-management/rpm/blob/4afe2d14d33db82ccb41c0a8d5eb1a4db90762fc/tests/rpmvercmp.at#L94

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#60725; Package guix. (Wed, 11 Jan 2023 13:25:01 GMT) Full text and rfc822 format available.

Message #8 received at 60725 <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 60725 <at> debbugs.gnu.org
Subject: Re: bug#60725: guix lint thinks 2019111-0.7e76d75 is older than
 20191111
Date: Wed, 11 Jan 2023 14:24:32 +0100
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Hi Guix,
>
> If you run 'guix lint emacs-enh-ruby-mode', it'll print this:
>
> --8<---------------cut here---------------start------------->8---
> emacs-enh-ruby-mode <at> 2019111-0.7e76d75: can be upgraded to 20191111
> --8<---------------cut here---------------end--------------->8---
In this particular case, 2019111 seems to have been a typo in the first
place.  (It misses out on a '1' in our package record).

AFAIK, any sane versioning scheme would assert that 20191111 > 2019111-anything.




Information forwarded to bug-guix <at> gnu.org:
bug#60725; Package guix. (Wed, 11 Jan 2023 13:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 60725 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Jelle Licht <jlicht <at> fsfe.org>
Cc: 60725 <at> debbugs.gnu.org, GNU Debbugs <control <at> debbugs.gnu.org>
Subject: Re: bug#60725: guix lint thinks 2019111-0.7e76d75 is older than
 20191111
Date: Wed, 11 Jan 2023 08:43:00 -0500
retitle 60725 support the special '~' character in our version parser
thanks

Jelle Licht <jlicht <at> fsfe.org> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Hi Guix,
>>
>> If you run 'guix lint emacs-enh-ruby-mode', it'll print this:
>>
>> --8<---------------cut here---------------start------------->8---
>> emacs-enh-ruby-mode <at> 2019111-0.7e76d75: can be upgraded to 20191111
>> --8<---------------cut here---------------end--------------->8---
> In this particular case, 2019111 seems to have been a typo in the first
> place.  (It misses out on a '1' in our package record).

Thanks!  With this typo fixed, 'guix lint' doesn't suggest a downgrade
anymore.

> AFAIK, any sane versioning scheme would assert that 20191111 > 2019111-anything.

That's not currently the case with Guix.  Guix package version strings
are documented has having the requirement to be 'monotonically
increasing', so '43.rc3' as used by GNOME is seen by Guix as newer than
'43', the final release.

I'll keep this bug open (and retitle it), because implementing ~ would
be useful (GNOME makes use of that scheme, and it's understood by rpm,
dpkg, pkg-config, etc.).

-- 
Thanks,
Maxim




Changed bug title to 'support the special '~' character in our version parser' from 'guix lint thinks 2019111-0.7e76d75 is older than 20191111' Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 11 Jan 2023 13:44:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#60725; Package guix. (Wed, 11 Jan 2023 14:35:02 GMT) Full text and rfc822 format available.

Message #16 received at 60725 <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 60725 <at> debbugs.gnu.org, GNU Debbugs <control <at> debbugs.gnu.org>
Subject: Re: bug#60725: guix lint thinks 2019111-0.7e76d75 is older than
 20191111
Date: Wed, 11 Jan 2023 15:34:39 +0100
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> retitle 60725 support the special '~' character in our version parser
> thanks
>
> Jelle Licht <jlicht <at> fsfe.org> writes:
>
>> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>>
>>> Hi Guix,
>>>
>>> If you run 'guix lint emacs-enh-ruby-mode', it'll print this:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> emacs-enh-ruby-mode <at> 2019111-0.7e76d75: can be upgraded to 20191111
>>> --8<---------------cut here---------------end--------------->8---
>> In this particular case, 2019111 seems to have been a typo in the first
>> place.  (It misses out on a '1' in our package record).
>
> Thanks!  With this typo fixed, 'guix lint' doesn't suggest a downgrade
> anymore.
>
>> AFAIK, any sane versioning scheme would assert that 20191111 > 2019111-anything.
>
> That's not currently the case with Guix.  Guix package version strings
> are documented has having the requirement to be 'monotonically
> increasing', so '43.rc3' as used by GNOME is seen by Guix as newer than
> '43', the final release.

I agree with your assesment, but note that my example (again) had one
"1" less, in which case Guix does the right thing :-).

>
> I'll keep this bug open (and retitle it), because implementing ~ would
> be useful (GNOME makes use of that scheme, and it's understood by rpm,
> dpkg, pkg-config, etc.).

Fixing our versioning code so  "123" > "123-alpha2" will also bring us
(more) in line with Semantic Versioning.

- Jelle




Information forwarded to bug-guix <at> gnu.org:
bug#60725; Package guix. (Wed, 11 Jan 2023 19:01:02 GMT) Full text and rfc822 format available.

Message #19 received at 60725 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Jelle Licht <jlicht <at> fsfe.org>
Cc: 60725 <at> debbugs.gnu.org, GNU Debbugs <control <at> debbugs.gnu.org>
Subject: Re: bug#60725: guix lint thinks 2019111-0.7e76d75 is older than
 20191111
Date: Wed, 11 Jan 2023 13:59:57 -0500
Hi,

Jelle Licht <jlicht <at> fsfe.org> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> retitle 60725 support the special '~' character in our version parser
>> thanks
>>
>> Jelle Licht <jlicht <at> fsfe.org> writes:

[...]

>> That's not currently the case with Guix.  Guix package version strings
>> are documented has having the requirement to be 'monotonically
>> increasing', so '43.rc3' as used by GNOME is seen by Guix as newer than
>> '43', the final release.
>
> I agree with your assesment, but note that my example (again) had one
> "1" less, in which case Guix does the right thing :-).

Ah! I failed to correctly read that version number again, eh!

-- 
Thanks,
Maxim




This bug report was last modified 2 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.