commit:     814f9ad4b3bfe41617e21f634b6facb84c2e1dfe
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 21 08:17:09 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Feb 21 08:17:09 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=814f9ad4

libq/tree: respect SLOT in query atom for tree_open_pkg

Bug: https://bugs.gentoo.org/710372
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 TODO.md     | 1 -
 libq/tree.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/TODO.md b/TODO.md
index 2cce64a..43c4d6a 100644
--- a/TODO.md
+++ b/TODO.md
@@ -46,7 +46,6 @@
 - support TTL field in binpkgs file
 - merge duplicate atoms on the CLI (`qmerge -Uq nano nano nano`)
 - unmerging should clean out @world set
-- test should work on local vdb (so TRAVIS can test it too)
 - fixup lame misnaming of force\_download (--fetch/--force) actually
   not-forcing things
 - use xpak.h instead of shelling out to qxpak binary

diff --git a/libq/tree.c b/libq/tree.c
index 1c2a54e..ebcc133 100644
--- a/libq/tree.c
+++ b/libq/tree.c
@@ -398,7 +398,7 @@ tree_open_pkg(tree_cat_ctx *cat_ctx, const char *name)
        /* see if this pkg matches the query, here we can finally check
         * version conditions like >=, etc. */
        if (cat_ctx->ctx->query_atom != NULL) {
-               (void)tree_get_atom(pkg_ctx, false);
+               (void)tree_get_atom(pkg_ctx, cat_ctx->ctx->query_atom->SLOT != 
NULL);
                if (atom_compare(pkg_ctx->atom, cat_ctx->ctx->query_atom) != 
EQUAL) {
                        tree_close_pkg(pkg_ctx);
                        return NULL;

Reply via email to