[coreboot] r105 - buildrom-devel/bin

svn at coreboot.org svn at coreboot.org
Wed Feb 6 18:47:16 CET 2008

Author: ward
Date: 2008-02-06 18:47:15 +0100 (Wed, 06 Feb 2008)
New Revision: 105


This fixes a subtle bug in the fetchsvn.sh script. Because of the use of an
exit statement in a subshell, the script did not abort when an svn update
failed, leading to tarballs that claimed to be some svn revision but were
really some other revision...

This is a trivial patch.

Signed-off-by: Ward Vandewege <ward at gnu.org>
Acked-by: Ward Vandewege <ward at gnu.org>

Modified: buildrom-devel/bin/fetchsvn.sh
--- buildrom-devel/bin/fetchsvn.sh	2008-02-01 23:17:26 UTC (rev 104)
+++ buildrom-devel/bin/fetchsvn.sh	2008-02-06 17:47:15 UTC (rev 105)
@@ -32,6 +32,16 @@
 			echo "Couldn't update the repository."
 			exit 1
+		if [ `echo $?` -ne 0 ]; then
+			# The parentheses around the cd $DIR/svn; svn update ... commands above
+			# cause those commands to be executed as a list, in a subshell. As a
+			# consequence, if something goes wrong the exit command exits the
+			# subshell, not the script. And that means that the tar command below was
+			# still being executed even if the svn checkout failed, which could lead
+			# to nasty, nasty situations where we had a tarball that claimed to be a
+			# certain SVN revision, but was really some other revision...
+		  exit 1
+		fi

More information about the coreboot mailing list