1 |
commit: 5674671e9d7e0e1251561d81a1154dd5d92e60ec |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 5 13:47:59 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 5 13:50:23 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5674671e |
7 |
|
8 |
qdepends: add support for BDEPEND |
9 |
|
10 |
Bug: https://bugs.gentoo.org/674936 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
man/include/qdepends.optdesc.yaml | 8 ++++---- |
14 |
man/qdepends.1 | 13 ++++++++----- |
15 |
qdepends.c | 15 ++++++++++++--- |
16 |
3 files changed, 24 insertions(+), 12 deletions(-) |
17 |
|
18 |
diff --git a/man/include/qdepends.optdesc.yaml b/man/include/qdepends.optdesc.yaml |
19 |
index 51b1cc7..5d786f3 100644 |
20 |
--- a/man/include/qdepends.optdesc.yaml |
21 |
+++ b/man/include/qdepends.optdesc.yaml |
22 |
@@ -1,13 +1,13 @@ |
23 |
all: | |
24 |
- Show *DEPEND, alias for \fB\-drp\fR. |
25 |
+ Show *DEPEND, alias for \fB\-drpb\fR. |
26 |
key: | |
27 |
Advanced option to allow querying the VDB. This option overrides |
28 |
- \fB\-d\fR, \fB\-r\fR, \fB\-p\fR or \fB\-a\fR. \fI<arg>\fR can be |
29 |
- any key from Portage's VDB, e.g.\ any file from |
30 |
+ \fB\-d\fR, \fB\-r\fR, \fB\-p\fR, \fB\-b\fR or \fB\-a\fR. |
31 |
+ \fI<arg>\fR can be any key from Portage's VDB, e.g.\ any file from |
32 |
var/db/pkg/<cat>/<pkg>/. |
33 |
query: | |
34 |
Query reverse deps. This basically reverses the search to any |
35 |
- package that references \fI<arg>\fR in DEPEND, RDEPEND or PDEPEND. |
36 |
+ package that references \fI<arg>\fR in DEPEND, RDEPEND, PDEPEND or BDEPEND. |
37 |
This can be useful to find consumers of a given package, e.g.\ to |
38 |
search for packages that have \fIlogwatch\fR in their DEPEND. |
39 |
name-only: | |
40 |
|
41 |
diff --git a/man/qdepends.1 b/man/qdepends.1 |
42 |
index 2e1aab2..0273999 100644 |
43 |
--- a/man/qdepends.1 |
44 |
+++ b/man/qdepends.1 |
45 |
@@ -1,5 +1,5 @@ |
46 |
.\" generated by mkman.py, please do NOT edit! |
47 |
-.TH qdepends "1" "May 2018" "Gentoo Foundation" "qdepends" |
48 |
+.TH qdepends "1" "Feb 2019" "Gentoo Foundation" "qdepends" |
49 |
.SH NAME |
50 |
qdepends \- show dependency info |
51 |
.SH SYNOPSIS |
52 |
@@ -32,15 +32,18 @@ Show RDEPEND info. |
53 |
\fB\-p\fR, \fB\-\-pdepend\fR |
54 |
Show PDEPEND info. |
55 |
.TP |
56 |
+\fB\-b\fR, \fB\-\-bdepend\fR |
57 |
+Show BDEPEND info. |
58 |
+.TP |
59 |
\fB\-k\fR \fI<arg>\fR, \fB\-\-key\fR \fI<arg>\fR |
60 |
Advanced option to allow querying the VDB. This option overrides |
61 |
-\fB\-d\fR, \fB\-r\fR, \fB\-p\fR or \fB\-a\fR. \fI<arg>\fR can be |
62 |
-any key from Portage's VDB, e.g.\ any file from |
63 |
+\fB\-d\fR, \fB\-r\fR, \fB\-p\fR, \fB\-b\fR or \fB\-a\fR. |
64 |
+\fI<arg>\fR can be any key from Portage's VDB, e.g.\ any file from |
65 |
var/db/pkg/<cat>/<pkg>/. |
66 |
.TP |
67 |
\fB\-Q\fR \fI<arg>\fR, \fB\-\-query\fR \fI<arg>\fR |
68 |
Query reverse deps. This basically reverses the search to any |
69 |
-package that references \fI<arg>\fR in DEPEND, RDEPEND or PDEPEND. |
70 |
+package that references \fI<arg>\fR in DEPEND, RDEPEND, PDEPEND or BDEPEND. |
71 |
This can be useful to find consumers of a given package, e.g.\ to |
72 |
search for packages that have \fIlogwatch\fR in their DEPEND. |
73 |
.TP |
74 |
@@ -48,7 +51,7 @@ search for packages that have \fIlogwatch\fR in their DEPEND. |
75 |
Only show category/package, instead of category/package-version. |
76 |
.TP |
77 |
\fB\-a\fR, \fB\-\-all\fR |
78 |
-Show *DEPEND, alias for \fB\-drp\fR. |
79 |
+Show *DEPEND, alias for \fB\-drpb\fR. |
80 |
.TP |
81 |
\fB\-f\fR, \fB\-\-format\fR |
82 |
Pretty-print DEPEND declaration to be used in an ebuild. This |
83 |
|
84 |
diff --git a/qdepends.c b/qdepends.c |
85 |
index e6b9bcf..92ae57b 100644 |
86 |
--- a/qdepends.c |
87 |
+++ b/qdepends.c |
88 |
@@ -1,5 +1,5 @@ |
89 |
/* |
90 |
- * Copyright 2005-2018 Gentoo Authors |
91 |
+ * Copyright 2005-2019 Gentoo Authors |
92 |
* Distributed under the terms of the GNU General Public License v2 |
93 |
* |
94 |
* Copyright 2005-2010 Ned Ludd - <solar@g.o> |
95 |
@@ -9,11 +9,12 @@ |
96 |
|
97 |
#ifdef APPLET_qdepends |
98 |
|
99 |
-#define QDEPENDS_FLAGS "drpafNk:Q:" COMMON_FLAGS |
100 |
+#define QDEPENDS_FLAGS "drpbafNk:Q:" COMMON_FLAGS |
101 |
static struct option const qdepends_long_opts[] = { |
102 |
{"depend", no_argument, NULL, 'd'}, |
103 |
{"rdepend", no_argument, NULL, 'r'}, |
104 |
{"pdepend", no_argument, NULL, 'p'}, |
105 |
+ {"bdepend", no_argument, NULL, 'b'}, |
106 |
{"key", a_argument, NULL, 'k'}, |
107 |
{"query", a_argument, NULL, 'Q'}, |
108 |
{"name-only", no_argument, NULL, 'N'}, |
109 |
@@ -25,6 +26,7 @@ static const char * const qdepends_opts_help[] = { |
110 |
"Show DEPEND info (default)", |
111 |
"Show RDEPEND info", |
112 |
"Show PDEPEND info", |
113 |
+ "Show BDEPEND info", |
114 |
"User defined vdb key", |
115 |
"Query reverse deps", |
116 |
"Only show package name", |
117 |
@@ -639,7 +641,13 @@ int qdepends_main(int argc, char **argv) |
118 |
bool do_format = false; |
119 |
const char *query = NULL; |
120 |
const char *depend_file; |
121 |
- const char *depend_files[] = { "DEPEND", "RDEPEND", "PDEPEND", NULL, NULL }; |
122 |
+ const char *depend_files[] = { |
123 |
+ /* 0 */ "DEPEND", |
124 |
+ /* 1 */ "RDEPEND", |
125 |
+ /* 2 */ "PDEPEND", |
126 |
+ /* 3 */ "BDEPEND", |
127 |
+ /* 4 */ NULL |
128 |
+ }; |
129 |
|
130 |
depend_file = depend_files[0]; |
131 |
|
132 |
@@ -650,6 +658,7 @@ int qdepends_main(int argc, char **argv) |
133 |
case 'd': depend_file = depend_files[0]; break; |
134 |
case 'r': depend_file = depend_files[1]; break; |
135 |
case 'p': depend_file = depend_files[2]; break; |
136 |
+ case 'b': depend_file = depend_files[3]; break; |
137 |
case 'k': depend_file = optarg; break; |
138 |
case 'a': depend_file = NULL; break; |
139 |
case 'Q': query = optarg; break; |