[Rpm-maint] [rpm-software-management/rpm] Wrong version comparison (Issue #2574)
Mattia Verga
notifications at github.com
Sun Jul 16 12:50:06 UTC 2023
Trying to compare two package versions with snapshot information produces wrong comparison:
```
$ rpmdev-vercmp 1.7.0~202307168f43b0b 1.7.0~20230709062d5b2
1.7.0~202307168f43b0b < 1.7.0~20230709062d5b2
```
The first has `~20230716...` so it should evaluate higher than `~20230709`.
The version comparison seems to fail because the second hash digit is a letter and not a number:
```
$ rpmdev-vercmp 1.7.0~202307168 1.7.0~202307090
1.7.0~202307168 > 1.7.0~202307090
$ rpmdev-vercmp 1.7.0~202307168f 1.7.0~2023070906
1.7.0~202307168f < 1.7.0~2023070906
$ rpmdev-vercmp 1.7.0~202307168f 1.7.0~2023070906
1.7.0~2023071681 > 1.7.0~2023070906
```
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2574
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/2574 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230716/1f30fe4b/attachment.html>
More information about the Rpm-maint
mailing list