buildgcc: Fail if a patch failed to apply

Otherwise one could end up with what they think is a coreboot toolchain
but in fact it'd be missing some patches.

Change-Id: Ic451f7061b822d0f4b64acc9976ba81fd544e85b
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10487
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
Stefan Reinauer 2015-06-09 11:54:49 -07:00
parent d0f837239d
commit 916b8455ff
1 changed files with 3 additions and 1 deletions

View File

@ -226,8 +226,10 @@ unpack_and_patch() {
for patch in patches/${dir}_*.patch; do for patch in patches/${dir}_*.patch; do
test -r $patch || continue test -r $patch || continue
printf " o $(basename $patch)\n" printf " o $(basename $patch)\n"
$PATCH -s -N -p0 < $(echo $patch) || \ $PATCH -s -N -p0 < $(echo $patch) || {
printf "\n${RED}Failed $patch.${NC}\n" printf "\n${RED}Failed $patch.${NC}\n"
exit 1
}
done done
touch ${dir}/.unpack_success touch ${dir}/.unpack_success
) )