Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2018-08-29 01:10:21 -0400
committerAllan McRae <allan@archlinux.org>2018-08-29 16:00:01 +1000
commit5b2ff51c399a906fd70df62ca179e2a696ea3860 (patch)
tree66e4bb04866aea229980b5e8d66f1f9f51046050
parent16f6aae33087ec04c1dc90aa84f7d3dde4333046 (diff)
makepkg: don't print status for run_function when in a subshell
It's most likely a case where output is being captured, so we shouldn't be interleaving status messages with function output regardless. Setting the pkgver() status message (the one time we use it in a subshell) separately also makes it safe to change whether message.sh functions write to stdout or stderr. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 4e8f9dc3..89a31148 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -187,6 +187,7 @@ enter_fakeroot() {
# Automatically update pkgver variable if a pkgver() function is provided
# Re-sources the PKGBUILD afterwards to allow for other variables that use $pkgver
update_pkgver() {
+ msg "$(gettext "Starting %s()...")" "pkgver"
newpkgver=$(run_function_safe pkgver)
if (( $? != 0 )); then
error_function pkgver
@@ -447,7 +448,9 @@ run_function() {
fi
local pkgfunc="$1"
- msg "$(gettext "Starting %s()...")" "$pkgfunc"
+ if (( ! BASH_SUBSHELL )); then
+ msg "$(gettext "Starting %s()...")" "$pkgfunc"
+ fi
cd_safe "$srcdir"
local ret=0