1 |
commit: 3d88c2912ee04e9bb9d2359e3a62ee9f22056447 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 3 11:49:48 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 3 11:49:48 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3d88c291 |
7 |
|
8 |
qgrep: fix matching revisioned ebuilds |
9 |
|
10 |
Bug: https://bugs.gentoo.org/696078 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
TODO.md | 1 + |
14 |
qgrep.c | 7 ++++--- |
15 |
2 files changed, 5 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/TODO.md b/TODO.md |
18 |
index 299cf17..3db00f7 100644 |
19 |
--- a/TODO.md |
20 |
+++ b/TODO.md |
21 |
@@ -32,6 +32,7 @@ |
22 |
foo-(1234)\_alpha(56789) |
23 |
- these limits should not be an issue for all practical purposes |
24 |
- remove zalloc from atom explode (just initialise what needs to) |
25 |
+- make PVR match PMS https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-10800011 |
26 |
|
27 |
# qmerge |
28 |
|
29 |
|
30 |
diff --git a/qgrep.c b/qgrep.c |
31 |
index 1f6d0de..2a64d1b 100644 |
32 |
--- a/qgrep.c |
33 |
+++ b/qgrep.c |
34 |
@@ -416,14 +416,15 @@ qgrep_cache_cb(tree_pkg_ctx *pkg_ctx, void *priv) |
35 |
} |
36 |
|
37 |
/* cat/pkg/pkg-ver.ebuild */ |
38 |
- snprintf(buf, sizeof(buf), "%s/%s/%s.ebuild", |
39 |
- patom->CATEGORY, patom->PN, patom->P); |
40 |
+ snprintf(buf, sizeof(buf), "%s/%s/%s-%s.ebuild", |
41 |
+ patom->CATEGORY, patom->PN, patom->PN, |
42 |
+ patom->PR_int > 0 ? patom->PVR : patom->PV); |
43 |
|
44 |
label = NULL; |
45 |
if (data->show_name) { |
46 |
if (data->show_repo) |
47 |
patom = tree_get_atom(pkg_ctx, true); |
48 |
- atom_format_r(name, sizeof(name), "%[CATEGORY]%[P]%[REPO]", patom); |
49 |
+ atom_format_r(name, sizeof(name), "%[CATEGORY]%[PF]%[REPO]", patom); |
50 |
label = name; |
51 |
} else if (data->show_filename) { |
52 |
label = buf; |