aboutsummaryrefslogtreecommitdiff
path: root/quse.c
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-05-16 15:04:04 +0200
committerFabian Groffen <grobian@gentoo.org>2020-05-16 15:04:04 +0200
commit8b113397cda725a0d94782811913a1a03f5e6d46 (patch)
tree9b653c235bcad8a0667f13fce4e165ffba5ba8d1 /quse.c
parentquse: make -R flag work with -D (diff)
downloadportage-utils-8b113397cda725a0d94782811913a1a03f5e6d46.tar.gz
portage-utils-8b113397cda725a0d94782811913a1a03f5e6d46.tar.bz2
portage-utils-8b113397cda725a0d94782811913a1a03f5e6d46.zip
quse: fix interaction of -R with -D
ensure descriptions can be retrieved when -R is in effect Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'quse.c')
-rw-r--r--quse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/quse.c b/quse.c
index bcbb6201..1e39ce04 100644
--- a/quse.c
+++ b/quse.c
@@ -141,12 +141,14 @@ quse_search_use_local_desc(int portdirfd, struct quse_state *state)
continue;
atom->REPO = (char *)state->repo;
+ atom->SLOT = state->match->SLOT; /* fake match */
if (state->match == NULL ||
atom_compare(atom, state->match) == EQUAL)
{
if (state->do_list) {
state->retv[i] = xstrdup(q);
} else {
+ atom->SLOT = NULL; /* reset fake slot */
printf("%s[%s%s%s] %s\n",
atom_format(state->fmt, atom),
MAGENTA, p, NORM, q);
@@ -546,6 +548,7 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv)
.do_describe = false,
.do_list = true,
.match = atom,
+ .repo = state->repo,
.argc = cnt,
.argv = xmalloc(sizeof(char *) * cnt),
.retv = xzalloc(sizeof(char *) * cnt),