summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-06-30 22:16:25 +1000
committerDan McGee <dan@archlinux.org>2010-06-30 08:32:34 -0500
commitc11bf581a33babdbdf7b769567415b1faf1c4219 (patch)
tree1be7267a8cb7c560a99eea8a5376afb536e0951f /scripts
parent081e6a83608a28516abb326c1f66a07b691e1a32 (diff)
downloadpacman-c11bf581a33babdbdf7b769567415b1faf1c4219.tar.xz
makepkg: clarify aborting on packaging failure
When makepkg catches a command failure it currently prints "Aborting..." and exits. Clarify the reason for aborting from packaging is a failure during one of the PKGBUILDs functions. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index cbc344de..fdedc89b 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -721,6 +721,7 @@ error_function() {
fi
# first exit all subshells, then print the error
if (( ! BASH_SUBSHELL )); then
+ error "$(gettext "A failure occurred in %s().")" "$1"
plain "$(gettext "Aborting...")"
remove_deps
fi
@@ -768,7 +769,7 @@ run_function() {
tee "$BUILDLOG" < "$logpipe" &
exec 1>"$logpipe" 2>"$logpipe"
restoretrap=$(trap -p ERR)
- trap 'error_function' ERR
+ trap 'error_function $pkgfunc' ERR
$pkgfunc 2>&1
eval $restoretrap
sync
@@ -776,7 +777,7 @@ run_function() {
rm "$logpipe"
else
restoretrap=$(trap -p ERR)
- trap 'error_function' ERR
+ trap 'error_function $pkgfunc' ERR
$pkgfunc 2>&1
eval $restoretrap
fi