Re: [pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

2018-06-04 Thread Jan Alexander Steffens
On Mon, Jun 4, 2018 at 1:05 PM Allan McRae wrote: > On 04/06/18 18:47, Jan Alexander Steffens wrote: > > The ERR trap is not inherited by functions unless the "errtrace" option > > is set. So in the current situation, makepkg's internal functions are > > supposed to do manual error checking. Bad

Re: [pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

2018-06-04 Thread Allan McRae
On 04/06/18 18:47, Jan Alexander Steffens wrote: > The ERR trap is not inherited by functions unless the "errtrace" option > is set. So in the current situation, makepkg's internal functions are > supposed to do manual error checking. Bad returns from function calls at > the top level will trigger

Re: [pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

2018-06-04 Thread Jan Alexander Steffens
The ERR trap is not inherited by functions unless the "errtrace" option is set. So in the current situation, makepkg's internal functions are supposed to do manual error checking. Bad returns from function calls at the top level will trigger the trap, though. On Mon, Jun 4, 2018 at 9:59 AM Allan

Re: [pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

2018-06-04 Thread Allan McRae
On 01/06/18 02:24, Jan Alexander Steffens (heftig) wrote: > $restoretrap is empty if the trap was not set. This caused the trap > handler to remain and override later exit codes. How is this ever unset? We set the error trap early in makepkg: trap 'trap_exit USR1 "$(gettext "An unknown error has

[pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

2018-05-31 Thread Jan Alexander Steffens (heftig)
$restoretrap is empty if the trap was not set. This caused the trap handler to remain and override later exit codes. --- scripts/makepkg.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ed0ceaec..3a3f4c30 100644 ---