diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-11-26 04:43:52 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-11-26 04:43:52 -0500 |
commit | 7c3b484d601e6c06cfc692bbf011fca338697725 (patch) | |
tree | 220a39aa2785982d2ca0afbf9b6c36e6209aea63 /quse.c | |
parent | main: load all overlays from repos.conf (diff) | |
download | portage-utils-7c3b484d601e6c06cfc692bbf011fca338697725.tar.gz portage-utils-7c3b484d601e6c06cfc692bbf011fca338697725.tar.bz2 portage-utils-7c3b484d601e6c06cfc692bbf011fca338697725.zip |
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.
Diffstat (limited to 'quse.c')
-rw-r--r-- | quse.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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; } |