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: Fri, 21 Feb 2020 08:18:06
Message-Id: 1582273029.814f9ad4b3bfe41617e21f634b6facb84c2e1dfe.grobian@gentoo
1 commit: 814f9ad4b3bfe41617e21f634b6facb84c2e1dfe
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 21 08:17:09 2020 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 21 08:17:09 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=814f9ad4
7
8 libq/tree: respect SLOT in query atom for tree_open_pkg
9
10 Bug: https://bugs.gentoo.org/710372
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 TODO.md | 1 -
14 libq/tree.c | 2 +-
15 2 files changed, 1 insertion(+), 2 deletions(-)
16
17 diff --git a/TODO.md b/TODO.md
18 index 2cce64a..43c4d6a 100644
19 --- a/TODO.md
20 +++ b/TODO.md
21 @@ -46,7 +46,6 @@
22 - support TTL field in binpkgs file
23 - merge duplicate atoms on the CLI (`qmerge -Uq nano nano nano`)
24 - unmerging should clean out @world set
25 -- test should work on local vdb (so TRAVIS can test it too)
26 - fixup lame misnaming of force\_download (--fetch/--force) actually
27 not-forcing things
28 - use xpak.h instead of shelling out to qxpak binary
29
30 diff --git a/libq/tree.c b/libq/tree.c
31 index 1c2a54e..ebcc133 100644
32 --- a/libq/tree.c
33 +++ b/libq/tree.c
34 @@ -398,7 +398,7 @@ tree_open_pkg(tree_cat_ctx *cat_ctx, const char *name)
35 /* see if this pkg matches the query, here we can finally check
36 * version conditions like >=, etc. */
37 if (cat_ctx->ctx->query_atom != NULL) {
38 - (void)tree_get_atom(pkg_ctx, false);
39 + (void)tree_get_atom(pkg_ctx, cat_ctx->ctx->query_atom->SLOT != NULL);
40 if (atom_compare(pkg_ctx->atom, cat_ctx->ctx->query_atom) != EQUAL) {
41 tree_close_pkg(pkg_ctx);
42 return NULL;