diff options
author | 2023-07-17 19:29:55 +0200 | |
---|---|---|
committer | 2023-07-17 19:29:55 +0200 | |
commit | 360d18ba7cfbbd285f5ed6d97892778685b8a106 (patch) | |
tree | 11485683987b06a3f1153c7bb59b18c31758914d | |
parent | main: silence repo warnings when quiet is set (diff) | |
download | portage-utils-360d18ba7cfbbd285f5ed6d97892778685b8a106.tar.gz portage-utils-360d18ba7cfbbd285f5ed6d97892778685b8a106.tar.bz2 portage-utils-360d18ba7cfbbd285f5ed6d97892778685b8a106.zip |
initialize_portage_env: init color and quiet defaults early
profile init code may use warn etc so ensure we have colours defined and
quiet setup via fallback
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r-- | main.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -979,6 +979,14 @@ initialize_portage_env(void) const char *configroot = getenv("PORTAGE_CONFIGROOT"); char *primary_overlay = NULL; + /* ensure color strings are initialised, code below here may use + * e.g. warn which uses them */ + color_clear(); + + /* set quiet early in the game, bug #735134 */ + if (getenv("PORTAGE_QUIET") != NULL) + setup_quiet(); + /* initialize all the properties with their default value */ for (i = 0; vars_to_read[i].name; ++i) { var = &vars_to_read[i]; @@ -1221,9 +1229,6 @@ initialize_portage_env(void) } } - if (getenv("PORTAGE_QUIET") != NULL) - setup_quiet(); - if (nocolor) { color_clear(); setenv("NOCOLOR", "true", 1); |