aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2023-12-05 15:19:50 -0800
committerMike Frysinger <vapier@gentoo.org>2023-12-20 16:30:56 -0500
commit23d47fe0ead50e4a98eb4b1a02f68d350f53a166 (patch)
tree0f6523365c8427a8341118bb3c42f0750c03dc46
parentmain: init quiet early for repo checks (diff)
downloadportage-utils-23d47fe0ead50e4a98eb4b1a02f68d350f53a166.tar.gz
portage-utils-23d47fe0ead50e4a98eb4b1a02f68d350f53a166.tar.bz2
portage-utils-23d47fe0ead50e4a98eb4b1a02f68d350f53a166.zip
qmerge: Send ewarn, etc., to stderr
The PMS specifically calls out that ewarn should not display its message to stdout. Portage sends all e{log,info,warn,...} to stderr. Imitate that. This discrepancy causes problems for ghc-package.eclass users, for one, as there are instances where that class purposely dumps a warning and then expects its callers to still use its stdout as a result. Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--qmerge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/qmerge.c b/qmerge.c
index 246a7336..cbf94e6d 100644
--- a/qmerge.c
+++ b/qmerge.c
@@ -794,8 +794,8 @@ pkg_run_func_at(
"has() { hasq \"$@\"; }\n"
"hasq() { local h=$1; shift; case \" $* \" in *\" $h \"*) return 0;; *) return 1;; esac; }\n"
"hasv() { hasq \"$@\" && echo \"$1\"; }\n"
- "elog() { printf ' * %%b\\n' \"$*\"; }\n"
- "einfon() { printf ' * %%b' \"$*\"; }\n"
+ "elog() { printf ' * %%b\\n' \"$*\" >&2; }\n"
+ "einfon() { printf ' * %%b' \"$*\" >&2; }\n"
"einfo() { elog \"$@\"; }\n"
"ewarn() { elog \"$@\"; }\n"
"eqawarn() { elog \"QA: \"\"$@\"; }\n"
@@ -805,8 +805,8 @@ pkg_run_func_at(
"fperms() { local f a=$1; shift; for f in \"$@\"; do chmod $a \"${ED}/${f}\"; done; }\n"
/* TODO: This should suppress `die` */
"nonfatal() { \"$@\"; }\n"
- "ebegin() { printf ' * %%b ...' \"$*\"; }\n"
- "eend() { local r=${1:-$?}; [ $# -gt 0 ] && shift; [ $r -eq 0 ] && echo ' [ ok ]' || echo \" $* \"'[ !! ]'; return $r; }\n"
+ "ebegin() { printf ' * %%b ...' \"$*\" >&2; }\n"
+ "eend() { local r=${1:-$?}; [ $# -gt 0 ] && shift; [ $r -eq 0 ] && echo ' [ ok ]' || echo \" $* \"'[ !! ]'; return $r; } >&2\n"
"dodir() { mkdir -p \"$@\"; }\n"
"keepdir() { dodir \"$@\" && touch \"$@\"/.keep_${CATEGORY}_${PN}-${SLOT%%/*}; }\n"
/* TODO: This should be fatal upon error */