mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
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>
This commit is contained in:
parent
081e6a8360
commit
c11bf581a3
@ -721,6 +721,7 @@ error_function() {
|
|||||||
fi
|
fi
|
||||||
# first exit all subshells, then print the error
|
# first exit all subshells, then print the error
|
||||||
if (( ! BASH_SUBSHELL )); then
|
if (( ! BASH_SUBSHELL )); then
|
||||||
|
error "$(gettext "A failure occurred in %s().")" "$1"
|
||||||
plain "$(gettext "Aborting...")"
|
plain "$(gettext "Aborting...")"
|
||||||
remove_deps
|
remove_deps
|
||||||
fi
|
fi
|
||||||
@ -768,7 +769,7 @@ run_function() {
|
|||||||
tee "$BUILDLOG" < "$logpipe" &
|
tee "$BUILDLOG" < "$logpipe" &
|
||||||
exec 1>"$logpipe" 2>"$logpipe"
|
exec 1>"$logpipe" 2>"$logpipe"
|
||||||
restoretrap=$(trap -p ERR)
|
restoretrap=$(trap -p ERR)
|
||||||
trap 'error_function' ERR
|
trap 'error_function $pkgfunc' ERR
|
||||||
$pkgfunc 2>&1
|
$pkgfunc 2>&1
|
||||||
eval $restoretrap
|
eval $restoretrap
|
||||||
sync
|
sync
|
||||||
@ -776,7 +777,7 @@ run_function() {
|
|||||||
rm "$logpipe"
|
rm "$logpipe"
|
||||||
else
|
else
|
||||||
restoretrap=$(trap -p ERR)
|
restoretrap=$(trap -p ERR)
|
||||||
trap 'error_function' ERR
|
trap 'error_function $pkgfunc' ERR
|
||||||
$pkgfunc 2>&1
|
$pkgfunc 2>&1
|
||||||
eval $restoretrap
|
eval $restoretrap
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user