changeset 1162:9ea6b72beabc

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.
author Rob Landley <rob@landley.net>
date Sat, 10 Jul 2010 00:05:50 -0500
parents eec0d43778cc
children 2b05860c6cf1
files sources/functions.sh
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
 }