aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-11-20 15:24:33 +0100
committerFabian Groffen <grobian@gentoo.org>2018-11-20 15:24:33 +0100
commit2e83b5bd31ee989b79fbed7d2a9882f98c2771a5 (patch)
treeb678fbbd67434b51ca4ccfa9952f924217bb5f4f
parentdepends: fix matching atoms for bug #668418 (diff)
downloadportage-utils-2e83b5bd31ee989b79fbed7d2a9882f98c2771a5.tar.gz
portage-utils-2e83b5bd31ee989b79fbed7d2a9882f98c2771a5.tar.bz2
portage-utils-2e83b5bd31ee989b79fbed7d2a9882f98c2771a5.zip
qdepends: match reverse deps without SLOT if not given
Continuation of bug #668418, atom_compare is strict about SLOT matches. Bug: https://bugs.gentoo.org/668418 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--qdepends.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/qdepends.c b/qdepends.c
index 3ff0ebb..e6b9bcf 100644
--- a/qdepends.c
+++ b/qdepends.c
@@ -1,9 +1,10 @@
/*
- * Copyright 2005-2018 Gentoo Foundation
+ * Copyright 2005-2018 Gentoo Authors
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2005-2010 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2014 Mike Frysinger - <vapier@gentoo.org>
+ * Copyright 2018- Fabian Groffen - <grobian@gentoo.org>
*/
#ifdef APPLET_qdepends
@@ -486,6 +487,7 @@ qdepends_vdb_deep_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv)
depend_atom *as;
depend_atom *ac;
char firstmatch = 0;
+ char *sslot;
if (!q_vdb_pkg_eat(pkg_ctx, state->depend_file, &depend, &depend_len))
return 0;
@@ -569,7 +571,13 @@ qdepends_vdb_deep_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv)
ptr + match.rm_so);
ac = atom_explode(qbuf);
+ /* drop SLOT when not present in aq so we can match atoms
+ * regardless */
+ sslot = ac->SLOT;
+ if (aq->SLOT == NULL && ac->SLOT != NULL)
+ ac->SLOT = NULL;
ret = atom_compare(ac, aq);
+ ac->SLOT = sslot;
if (ret != EQUAL) {
atom_implode(ac);
break;