[pacman-dev] [PATCH] 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 command
failure.
Signed-off-by: Allan McRae
When makepkg catches a command failure it currently prints "Aborting..." and exits. Clarify the reason for aborting from packaging is a command failure.
Signed-off-by: Allan McRae
--- The message is still crap... Any ideas for better clarity?
scripts/makepkg.sh.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index cbc344d..a21a672 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 command failure occurred during packaging.")" It can occur in either function, right? This is skewed towards
On Wed, Jun 30, 2010 at 7:22 AM, Allan McRae
plain "$(gettext "Aborting...")" remove_deps fi -- 1.7.1
On 30/06/10 22:33, Dan McGee wrote:
When makepkg catches a command failure it currently prints "Aborting..." and exits. Clarify the reason for aborting from packaging is a command failure.
Signed-off-by: Allan McRae
--- The message is still crap... Any ideas for better clarity?
scripts/makepkg.sh.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index cbc344d..a21a672 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 command failure occurred during packaging.")" It can occur in either function, right? This is skewed towards
On Wed, Jun 30, 2010 at 7:22 AM, Allan McRae
wrote: package() rather than build(). What about "Aborting due to failure in $funcname"?
Hmm... it turns out you can pass parameters to error trap functions so that will work. Thanks.
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
On Wed, Jun 30, 2010 at 8:09 AM, Allan McRae
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
Signed-off-by: Dan McGee
---
The error now looks like: ==> ERROR: A failure occurred in package(). Aborting...
scripts/makepkg.sh.in | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index cbc344d..fdedc89 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 -- 1.7.1
Am 30.06.2010 15:09, schrieb Allan McRae:
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
Signed-off-by: Thomas Bächler
---
The error now looks like: ==> ERROR: A failure occurred in package(). Aborting...
scripts/makepkg.sh.in | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index cbc344d..fdedc89 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
participants (3)
-
Allan McRae
-
Dan McGee
-
Thomas Bächler