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: /
Date: Tue, 20 Nov 2018 14:25:58
Message-Id: 1542723873.2e83b5bd31ee989b79fbed7d2a9882f98c2771a5.grobian@gentoo
1 commit: 2e83b5bd31ee989b79fbed7d2a9882f98c2771a5
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 20 14:24:33 2018 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 20 14:24:33 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=2e83b5bd
7
8 qdepends: match reverse deps without SLOT if not given
9
10 Continuation of bug #668418, atom_compare is strict about SLOT matches.
11
12 Bug: https://bugs.gentoo.org/668418
13 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
14
15 qdepends.c | 10 +++++++++-
16 1 file changed, 9 insertions(+), 1 deletion(-)
17
18 diff --git a/qdepends.c b/qdepends.c
19 index 3ff0ebb..e6b9bcf 100644
20 --- a/qdepends.c
21 +++ b/qdepends.c
22 @@ -1,9 +1,10 @@
23 /*
24 - * Copyright 2005-2018 Gentoo Foundation
25 + * Copyright 2005-2018 Gentoo Authors
26 * Distributed under the terms of the GNU General Public License v2
27 *
28 * Copyright 2005-2010 Ned Ludd - <solar@g.o>
29 * Copyright 2005-2014 Mike Frysinger - <vapier@g.o>
30 + * Copyright 2018- Fabian Groffen - <grobian@g.o>
31 */
32
33 #ifdef APPLET_qdepends
34 @@ -486,6 +487,7 @@ qdepends_vdb_deep_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv)
35 depend_atom *as;
36 depend_atom *ac;
37 char firstmatch = 0;
38 + char *sslot;
39
40 if (!q_vdb_pkg_eat(pkg_ctx, state->depend_file, &depend, &depend_len))
41 return 0;
42 @@ -569,7 +571,13 @@ qdepends_vdb_deep_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv)
43 ptr + match.rm_so);
44 ac = atom_explode(qbuf);
45
46 + /* drop SLOT when not present in aq so we can match atoms
47 + * regardless */
48 + sslot = ac->SLOT;
49 + if (aq->SLOT == NULL && ac->SLOT != NULL)
50 + ac->SLOT = NULL;
51 ret = atom_compare(ac, aq);
52 + ac->SLOT = sslot;
53 if (ret != EQUAL) {
54 atom_implode(ac);
55 break;