Xavier wrote:
On Sun, Aug 23, 2009 at 12:56 PM, Allan McRae<allan@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.
Great
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?
Yeah... I also want to add a check() function to optionally run a packages test suite. That would look much the same too, so I intended to refactor this at some stage. Allan