[pacman-dev] [PATCH 1/3] makepkg: restrict usage of errexit to user functions
allan at archlinux.org
Wed Feb 15 07:05:54 EST 2012
On 15/02/12 04:57, Dave Reisner wrote:
> It's expected that this will lead to unwanted behavior, and needs
> widespread testing. It's desirable to commit this for a few reasons:
> - there's no reason we can't do our own error checking for code that we
> - it avoids the need for ||true hacks scattered about in the code.
> - it makes us immune to upstream changes in exit codes (FS#28248)
> Signed-off-by: Dave Reisner <dreisner at archlinux.org>
> Allan, just making sure we're on the same page -- this _will_ cause breakage,
> and the next patch in this series addresses one specific case. I figure getting
> this patch in now gives us "ample time" to uncover and fix all these before the
> next release.
OK... I like this idea somewhat as I have seen the issues this can
cause. But I have also seen it validly stop the scripts execution due
to errors that would have been non-obvious.
Here goes a few concerns you might help me alleviate:
1) does it really make us immune to upstream changes in exit codes? In
the particular example of mercurial, would we not be checking the exit
code of the "hg pull" part anyway?
2) how much extra error checking are we going to need to do? e.g. if I
look at create_srcpackage() would we only need to check the mkdir and ln
More information about the pacman-dev