[Top][All Lists]

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

[Octave-bug-tracker] [bug #55838] compare_versions: add support for deb/

From: Mike Miller
Subject: [Octave-bug-tracker] [bug #55838] compare_versions: add support for deb/rpm style "~" version sorting
Date: Tue, 5 Mar 2019 15:05:18 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36


                 Summary: compare_versions: add support for deb/rpm style "~"
version sorting
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Tue 05 Mar 2019 12:05:16 PM PST
                Category: Octave Function
                Severity: 1 - Wish
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any



I think it would be nice if Octave's 'compare_versions' function supported the
special case sorting of the tilde ('~') character as defined by both the deb
and rpm package formats.

Under this definition, any suffix of a version string that starts with '~'
sorts strictly less than the same string with the suffix completely removed.
Any characters after the '~' sort normally. For example, "1.0.0+" is greater
than "1.0.0" simply because it adds a suffix. With this change made, "1.0.0~"
is less than "1.0.0". And "1.0.0~a" is greater than "1.0.0~"

I will raise this on the maintainers list as well to see if there are any
strong objections, but I hope it's non-controversial since it's already
supported by both deb and rpm packaging tools.

One risk is that making this change might break existing sorting if any
third-party code is using compare_versions and using the '~' character. No
Octave Forge packages currently use '~'.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]