if you name two packages heat-18.0.0.0_rc1 and heat-18.0.0 portage will consider heat-18.0.0.0_rc1 the newest while from upstream, heat-18.0.0 is the newest is this intended? isn't x_rc1 < x and y.0 = y.0.0 ?
The version comparision algorithm is specified in PMS. I believe Portage implements it as specified. https://projects.gentoo.org/pms/8/pms.html#x1-260003.3
What is invalid? Upstream versioning scheme? Or you that don't believe me?
(In reply to Alessandro Barbieri from comment #2) > What is invalid? Upstream versioning scheme? Or you that don't believe me? floppym is saying the current implementation adheres to PMS. Do you think it doesn't agree with PMS, or it does but you want PMS changed?
I think it's reasonable to expect that 18.0.0 > 18.0.0.0_rc1 so I want to get this discussed and eventually change the PMS
Version comparisons are performed left to right, component by component. This is the behavior specified in PMS. In other words: 18.0.0_rc1 < 18.0.0 < 18.0.0.0_rc1 < 18.0.0.0 Changing this order would require updating PMS.
(In reply to Alessandro Barbieri from comment #4) > I think it's reasonable to expect that 18.0.0 > 18.0.0.0_rc1 > so I want to get this discussed and eventually change the PMS Please propose a new algorithm, and discuss it on the gentoo-dev mailing list.
We have 1.0.0 > 1.0 which was an intentional design choice, I suppose. It agrees with the ordering of strverscmp(3).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=7de2f154c775e9de276f2fc1f619922f48a13b90 commit 7de2f154c775e9de276f2fc1f619922f48a13b90 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2022-04-18 09:35:48 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2022-04-18 09:35:48 +0000 libq/atom: implement strict PMS 3.3 in atom_compare Version comparisons are complex, stick with strict PMS definition for it, so we produce the same results as Portage. Bug: https://bugs.gentoo.org/838856 Signed-off-by: Fabian Groffen <grobian@gentoo.org> autogen.sh | 1 + libq/atom.c | 249 ++++++++++++++++++++++++++++++++------ tests/atom_compare/static.q.good | 3 +- tests/atom_compare/static.q.tests | 1 + 4 files changed, 219 insertions(+), 35 deletions(-)