Atom name parts that start with '-' followed by a number are incorrectly assumed to be the version. With portage-utils-0.65: $ qatom media-fonts/font-adobe-100dpi-1.0.3-r1 media-fonts font-adobe-100dpi 1.0.3 r1 With portage-utils-0.70: $ qatom media-fonts/font-adobe-100dpi-1.0.3-r1 media-fonts font-adobe <unset> r1 Other utilities like for example qlist also return erroneous results: $ qlist -CIS abobe media-fonts/font-adobe:0
The problem with these is that PMS mandates that package names may not contain a hyphen followed by a version string. A version string starts with a digit. See https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-160003.1 Now I guess what Portage does, is try to parse 100dpi as version, and concludes it is invalid, therefore should belong to package name. Ultimately atom parsing should do the same, I guess.
Yes, it is tricky. The previous algorithm did the parsing starting from the end without validation. For example this should probably be invalid: $ qatom media-fonts/font-adobe-100-1.0.3-r1 media-fonts font-adobe-100 1.0.3 r1
Yes, per PMS spec that should be invalid. For other bugs/misparsings, I had to change the parse order somewhat, so this remains a fun game :)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=712cbd379172e444c399a48d08d76a402e822697 commit 712cbd379172e444c399a48d08d76a402e822697 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2018-04-12 18:28:20 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2018-04-12 18:28:20 +0000 atom_explode: try harder to find correct PV It's not enough to find a hyphen followed by something that looks like a version, it needs to be verified it really is, else it is part of the package name. Bug: https://bugs.gentoo.org/653032 libq/atom_explode.c | 51 ++++++++++++++++++++++++--------------------------- tests/qatom/dotest | 3 +++ 2 files changed, 27 insertions(+), 27 deletions(-)}
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47d5c9788b9550078e17aad238fa03cabe20fd46 commit 47d5c9788b9550078e17aad238fa03cabe20fd46 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2018-05-18 12:27:07 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2018-05-18 12:27:23 +0000 app-portage/portage-utils: version bump to v0.71 Closes: https://bugs.gentoo.org/619988 Closes: https://bugs.gentoo.org/653202 Closes: https://bugs.gentoo.org/652312 Closes: https://bugs.gentoo.org/652720 Closes: https://bugs.gentoo.org/653032 Package-Manager: Portage-2.3.24, Repoman-2.3.6 app-portage/portage-utils/Manifest | 2 +- .../{portage-utils-0.65.ebuild => portage-utils-0.71.ebuild} | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-)