1 |
commit: 951a8711a59b1a7d49125f5f5214ff1ae9e50074 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 28 19:27:12 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 28 19:27:12 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=951a8711 |
7 |
|
8 |
qfile: drop non-functional --exact option |
9 |
|
10 |
Bug: https://bugs.gentoo.org/678632 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
man/qfile.1 | 3 --- |
14 |
qfile.c | 11 ++--------- |
15 |
2 files changed, 2 insertions(+), 12 deletions(-) |
16 |
|
17 |
diff --git a/man/qfile.1 b/man/qfile.1 |
18 |
index c7f7054..6bf07c0 100644 |
19 |
--- a/man/qfile.1 |
20 |
+++ b/man/qfile.1 |
21 |
@@ -27,9 +27,6 @@ List orphan files. |
22 |
\fB\-x\fR \fI<arg>\fR, \fB\-\-exclude\fR \fI<arg>\fR |
23 |
Don't look in package <arg> (used with --orphans). |
24 |
.TP |
25 |
-\fB\-e\fR, \fB\-\-exact\fR |
26 |
-Exact match (used with --exclude). |
27 |
-.TP |
28 |
\fB\-\-root\fR \fI<arg>\fR |
29 |
Set the ROOT env var. |
30 |
.TP |
31 |
|
32 |
diff --git a/qfile.c b/qfile.c |
33 |
index 285277b..6e1cb0a 100644 |
34 |
--- a/qfile.c |
35 |
+++ b/qfile.c |
36 |
@@ -8,14 +8,13 @@ |
37 |
|
38 |
#ifdef APPLET_qfile |
39 |
|
40 |
-#define QFILE_FLAGS "beoRx:S" COMMON_FLAGS |
41 |
+#define QFILE_FLAGS "boRx:S" COMMON_FLAGS |
42 |
static struct option const qfile_long_opts[] = { |
43 |
{"slots", no_argument, NULL, 'S'}, |
44 |
{"root-prefix", no_argument, NULL, 'R'}, |
45 |
{"basename", no_argument, NULL, 'b'}, |
46 |
{"orphans", no_argument, NULL, 'o'}, |
47 |
{"exclude", a_argument, NULL, 'x'}, |
48 |
- {"exact", no_argument, NULL, 'e'}, |
49 |
COMMON_LONG_OPTS |
50 |
}; |
51 |
static const char * const qfile_opts_help[] = { |
52 |
@@ -24,7 +23,6 @@ static const char * const qfile_opts_help[] = { |
53 |
"Match any component of the path", |
54 |
"List orphan files", |
55 |
"Don't look in package <arg> (used with --orphans)", |
56 |
- "Exact match (used with --exclude)", |
57 |
COMMON_OPTS_HELP |
58 |
}; |
59 |
#define qfile_usage(ret) usage(ret, QFILE_FLAGS, qfile_long_opts, qfile_opts_help, NULL, lookup_applet_idx("qfile")) |
60 |
@@ -56,7 +54,6 @@ struct qfile_opt_state { |
61 |
depend_atom *exclude_atom; |
62 |
bool slotted; |
63 |
bool basename; |
64 |
- bool exact; |
65 |
bool orphans; |
66 |
bool assume_root_prefix; |
67 |
}; |
68 |
@@ -224,7 +221,7 @@ static int qfile_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv) |
69 |
} else |
70 |
slot[0] = '\0'; |
71 |
printf("%s%s/%s%s%s%s", BOLD, atom->CATEGORY, BLUE, |
72 |
- (state->exact ? pkg_ctx->name : atom->PN), |
73 |
+ (verbose ? pkg_ctx->name : atom->PN), |
74 |
slot, NORM); |
75 |
if (quiet) |
76 |
puts(""); |
77 |
@@ -402,7 +399,6 @@ int qfile_main(int argc, char **argv) |
78 |
.buflen = _Q_PATH_MAX, |
79 |
.slotted = false, |
80 |
.basename = false, |
81 |
- .exact = false, |
82 |
.orphans = false, |
83 |
.assume_root_prefix = false, |
84 |
}; |
85 |
@@ -414,7 +410,6 @@ int qfile_main(int argc, char **argv) |
86 |
COMMON_GETOPTS_CASES(qfile) |
87 |
case 'S': state.slotted = true; break; |
88 |
case 'b': state.basename = true; break; |
89 |
- case 'e': state.exact = true; break; |
90 |
case 'o': state.orphans = true; break; |
91 |
case 'R': state.assume_root_prefix = true; break; |
92 |
case 'x': |
93 |
@@ -429,8 +424,6 @@ int qfile_main(int argc, char **argv) |
94 |
break; |
95 |
} |
96 |
} |
97 |
- if (!state.exact && verbose) |
98 |
- state.exact = true; |
99 |
if (argc == optind) |
100 |
qfile_usage(EXIT_FAILURE); |