commit: 48ca7946e74ed6c1c065589c50327948a41c25b7 Author: Barnabás Virágh <cyborgyn <AT> gmail <DOT> com> AuthorDate: Mon Oct 4 06:09:12 2021 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Mon Oct 4 06:09:12 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=48ca7946
libq/tree: properly set SUBSLOT value when absent (PMS 7.2) Bug: https://bugs.gentoo.org/816060 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> libq/tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libq/tree.c b/libq/tree.c index 847a343..87df175 100644 --- a/libq/tree.c +++ b/libq/tree.c @@ -1613,8 +1613,13 @@ tree_get_atom(tree_pkg_ctx *pkg_ctx, bool complete) char *ptr; if ((ptr = strchr(pkg_ctx->atom->SLOT, '/')) != NULL) { *ptr++ = '\0'; - pkg_ctx->atom->SUBSLOT = ptr; + } else { + /* PMS 7.2: When the sub-slot part is omitted from the + * SLOT definition, the package is considered to have an + * implicit sub-slot which is equal to the regular slot. */ + ptr = pkg_ctx->atom->SLOT; } + pkg_ctx->atom->SUBSLOT = ptr; } }
