Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage-utils:master commit in: libq/
Date: Mon, 04 Oct 2021 06:28:47
Message-Id: 1633327752.48ca7946e74ed6c1c065589c50327948a41c25b7.grobian@gentoo
1 commit: 48ca7946e74ed6c1c065589c50327948a41c25b7
2 Author: Barnabás Virágh <cyborgyn <AT> gmail <DOT> com>
3 AuthorDate: Mon Oct 4 06:09:12 2021 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 4 06:09:12 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=48ca7946
7
8 libq/tree: properly set SUBSLOT value when absent (PMS 7.2)
9
10 Bug: https://bugs.gentoo.org/816060
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 libq/tree.c | 7 ++++++-
14 1 file changed, 6 insertions(+), 1 deletion(-)
15
16 diff --git a/libq/tree.c b/libq/tree.c
17 index 847a343..87df175 100644
18 --- a/libq/tree.c
19 +++ b/libq/tree.c
20 @@ -1613,8 +1613,13 @@ tree_get_atom(tree_pkg_ctx *pkg_ctx, bool complete)
21 char *ptr;
22 if ((ptr = strchr(pkg_ctx->atom->SLOT, '/')) != NULL) {
23 *ptr++ = '\0';
24 - pkg_ctx->atom->SUBSLOT = ptr;
25 + } else {
26 + /* PMS 7.2: When the sub-slot part is omitted from the
27 + * SLOT definition, the package is considered to have an
28 + * implicit sub-slot which is equal to the regular slot. */
29 + ptr = pkg_ctx->atom->SLOT;
30 }
31 + pkg_ctx->atom->SUBSLOT = ptr;
32 }
33 }