[pacman-dev] [PATCH] Ensure build failure if a single build() command fails

Jürgen Hötzel juergen at hoetzel.info
Fri Jun 12 18:11:45 EDT 2009


On Fri, Jun 12, 2009 at 04:55:35PM -0500, Aaron Griffin wrote:
> Might be worthwhile to add a source comment indicating something about
> this. I don't know the details, but it looks to be the difference
> between $PIPESTATUS[0] and $?

Yep:

build 2>&1 | tee "$BUILDLOG"; ret=${PIPESTATUS[0]}
^^^^^

forked off, ERR trap is handled in new process, thus returning 1


build 2>&1 || ret=$?

	 ^^^^^^

failing commands part of `||' never trigger ERR traps (would end
"makepkg" in this case)

Jürgen

_____________________________
> pacman-dev mailing list
> pacman-dev at archlinux.org
> http://www.archlinux.org/mailman/listinfo/pacman-dev


More information about the pacman-dev mailing list