commit: 7c3b484d601e6c06cfc692bbf011fca338697725
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 26 09:43:52 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 09:43:52 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=7c3b484d
quse: move file warnings behind verbose
Usually missing desc files are not errors but normal behavior:
people have trimmed the files or are using repos w/out them.
Move the warnings related to them behind --verbose so we don't
clutter up normal output.
quse.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/quse.c b/quse.c
index 049b6e9..c7c1863 100644
--- a/quse.c
+++ b/quse.c
@@ -97,8 +97,9 @@ quse_describe_flag(unsigned int ind, unsigned int argc, char
**argv)
for (i = 0; i < NUM_SEARCH_FILES; ++i) {
snprintf(buf, buflen, "%s/profiles/%s", portdir,
search_files[i]);
- if ((fp[i] = fopen(buf, "r")) == NULL)
- warnp("skipping %s", search_files[i]);
+ fp[i] = fopen(buf, "r");
+ if (verbose && fp[i] == NULL)
+ warnp("skipping %s", buf);
}
for (i = ind; i < argc; i++) {
@@ -157,7 +158,8 @@ quse_describe_flag(unsigned int ind, unsigned int argc,
char **argv)
/* now scan the desc dir */
snprintf(buf, buflen, "%s/profiles/desc/", portdir);
if ((d = opendir(buf)) == NULL) {
- warnp("skipping profiles/desc/");
+ if (verbose)
+ warnp("skipping %s", buf);
goto done;
}
@@ -171,7 +173,8 @@ quse_describe_flag(unsigned int ind, unsigned int argc,
char **argv)
snprintf(buf, buflen, "%s/profiles/desc/%s", portdir,
de->d_name);
if ((fp[0] = fopen(buf, "r")) == NULL) {
- warn("Could not open '%s' for reading; skipping",
de->d_name);
+ if (verbose)
+ warnp("skipping %s", buf);
continue;
}