makepkg: send messages to stdout rather than stderr

This behavior is confusing, since it means absolutely everything goes to
stderr and makepkg itself is a quiet program that produces no expected
output???

The only situation where messages should go to stderr rather than
stdout, is with --geninteg which is meant to return the checksums on
stdout (but we don't want to totally get rid of status messages when
redirecting the results elsewhere, or, worse, redirect status messages
to a PKGBUILD). For this specific case, redirect message output to
stderr in the --geninteg callers directly.

Implements FS#17173

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Eli Schwartz 2018-06-28 13:19:41 -04:00 committed by Allan McRae
parent b5191ea140
commit 882e707e40
3 changed files with 5 additions and 5 deletions

View file

@ -78,7 +78,7 @@ generate_one_checksum() {
}
generate_checksums() {
msg "$(gettext "Generating checksums for source files...")"
msg "$(gettext "Generating checksums for source files...")" >&2
local integlist
if (( $# == 0 )); then

View file

@ -45,17 +45,17 @@ colorize() {
plain() {
local mesg=$1; shift
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@"
}
msg() {
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@"
}
msg2() {
local mesg=$1; shift
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@"
}
warning() {

View file

@ -1477,7 +1477,7 @@ if (( GENINTEG )); then
mkdir -p "$srcdir"
chmod a-s "$srcdir"
cd_safe "$srcdir"
download_sources novcs allarch
download_sources novcs allarch >&2
generate_checksums
exit $E_OK
fi