1 |
commit: 53cf6891705c4b953074b5f4bc94b0d53ad9422a |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 25 10:37:13 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 25 10:37:13 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=53cf6891 |
7 |
|
8 |
qatom: adjust to changed tree_match_atom interface |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
qatom.c | 16 +++++++++++----- |
13 |
1 file changed, 11 insertions(+), 5 deletions(-) |
14 |
|
15 |
diff --git a/qatom.c b/qatom.c |
16 |
index 1c1c50e..a076c49 100644 |
17 |
--- a/qatom.c |
18 |
+++ b/qatom.c |
19 |
@@ -122,12 +122,18 @@ int qatom_main(int argc, char **argv) |
20 |
break; |
21 |
case _LOOKUP: |
22 |
{ |
23 |
- tree_pkg_ctx *pkg = tree_match_atom(tree, atom); |
24 |
+ tree_match_ctx *pkg = tree_match_atom(tree, atom, |
25 |
+ TREE_MATCH_DEFAULT); |
26 |
if (pkg != NULL) { |
27 |
- atomc = tree_get_atom(pkg, true); |
28 |
- if (!quiet) |
29 |
- printf("%s: ", atom_to_string(atom)); |
30 |
- printf("%s\n", atom_format(format, atomc)); |
31 |
+ tree_match_ctx *w; |
32 |
+ |
33 |
+ for (w = pkg; w != NULL; w = w->next) { |
34 |
+ if (!quiet) |
35 |
+ printf("%s: ", atom_to_string(atom)); |
36 |
+ printf("%s\n", atom_format(format, w->atom)); |
37 |
+ } |
38 |
+ |
39 |
+ tree_match_close(pkg); |
40 |
} |
41 |
} |
42 |
} |