[pacman-dev] [PATCH] makepkg: exit on error during build() or package()

Xavier shiningxc at gmail.com
Sun Aug 23 08:17:25 EDT 2009


On Sun, Aug 23, 2009 at 12:56 PM, Allan McRae<allan at archlinux.org> wrote:
> Henning Garus wrote:
>>
>> Set the ERR trap to abort upon encountering an error during the execution
>> of a build or package function.
>>
>> Activate set -E, which lets functions inherit the ERR trap.
>>
>>
>>
>
> <snip>
>
> Just a quick query...  does this work with split packages and variables
> defined in the package_foo() functions, especially when using the -L flag?
>  I am too busy to test at the moment, but that has been the main issue in
> getting this working in the past.
>

If I understood correctly, all the problems came from the piping.
Actually that's why you had to find an alternative to " | tee " in
run_package.
This patch does not introduce any piping so it should be fine on this side.

I tested it now and it seems to work fine.

A comment I had when looking at the patch : it seems like run_build
and run_package are widely duplicated. I believe it is possible to
refactor the biggest part of them in a run_function $function. What do
you think?


More information about the pacman-dev mailing list