# HG changeset patch # User Rob Landley # Date 1278738350 18000 # Node ID 9ea6b72beabc716c481b76fb751fd1f2670e80fc # Parent eec0d43778cc1d1092d68b9ac115a96bf910874d Fix patching so sha1-for-source.txt only gets updated _after_ patch successfully applies (race with signal delivery), and make dienow output go to stderr instead of stdout. diff -r eec0d43778cc -r 9ea6b72beabc sources/functions.sh --- a/sources/functions.sh Fri Jul 09 13:03:01 2010 -0500 +++ b/sources/functions.sh Sat Jul 10 00:05:50 2010 -0500 @@ -188,9 +188,10 @@ if [ -f "$i" ] then echo "Applying $i" - (cd "${SRCTREE}/${PACKAGE}" && patch -p1 -i "$i") || + (cd "${SRCTREE}/${PACKAGE}" && + patch -p1 -i "$i" && + sha1file "$i" >> "$SHA1FILE") || ([ -z "$ALLOW_PATCH_FAILURE" ] && dienow) - sha1file "$i" >> "$SHA1FILE" fi done }