commit: b9592db1c04cafcdfaaff8f44ab2d6fc7d6dd5fa Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Fri Apr 21 19:10:23 2023 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Fri Apr 21 19:10:23 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b9592db1
main: silence repo warnings when quiet is set Bug: https://bugs.gentoo.org/735134 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> main.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 111d7ec..6ebb9e2 100644 --- a/main.c +++ b/main.c @@ -705,10 +705,13 @@ read_portage_profile(const char *profile, env_vars vars[], set *masks) /* empty repo name means a repo where the profile is */ const char* current_overlay = overlay_from_path (profile); if (current_overlay == NULL) { - /* bring back the colon to see the ignored parent line */ + /* bring back the colon to see the ignored + * parent line */ *(--p) = ':'; - warn("could not figure out current repo of profile %s, ignoring parent %s", - profile, s); + if (!quiet) + warn("could not figure out current repo " + "of profile %s, ignoring parent %s", + profile, s); continue; } snprintf(profile_file, sizeof(profile_file), @@ -726,10 +729,12 @@ read_portage_profile(const char *profile, env_vars vars[], set *masks) repo_name = NULL; } if (repo_name == NULL) { - /* bring back the colon to see the ignored parent line */ + /* bring back the colon to see the ignored + * parent line */ *(--p) = ':'; - warn("ignoring parent with unknown repo in profile %s: %s", - profile, s); + if (!quiet) + warn("ignoring parent with unknown repo " + "in profile %s: %s", profile, s); continue; } }
