diff options
authorSam Thursfield <>2014-10-27 11:40:09 (GMT)
committerSam Thursfield <>2014-10-27 15:45:03 (GMT)
commita762f3db05b0e5561c0b7ada843154173197d1f5 (patch)
parent32446688366229cad3f7bacb93e3118cff36163f (diff)
Allow distbuild.configure to be enabled without requiring configuration
Previously if you enabled distbuild.configure but didn't set all of the required variables, your deployment would fail. This has become much more annoying with the introduction of the build-system family of systems, which are indented to be suitable either as a local builder or part of a distbuild network.
1 files changed, 10 insertions, 9 deletions
diff --git a/distbuild.configure b/distbuild.configure
index d9b9fb8..062aaec 100644
--- a/distbuild.configure
+++ b/distbuild.configure
@@ -45,20 +45,21 @@ if [ -n "$DISTBUILD_GENERIC" ]; then
exit 0
+# Set default values for these two options if they are unset, so that if the
+# user specifies no distbuild config at all the configure extension exits
+# without doing anything but does not raise an error.
+if [ "$DISTBUILD_CONTROLLER" = False -a "$DISTBUILD_WORKER" = False ]; then
+ exit 0
set -u
# Check that all the variables needed are present:
-if [ "x$DISTBUILD_WORKER" = "x" ]; then
- echo "ERROR: DISTBUILD_WORKER needs to be defined."
- error_vars=true
-if [ "x$DISTBUILD_CONTROLLER" = "x" ]; then
- echo "ERROR: DISTBUILD_CONTROLLER needs to be defined."
- error_vars=true
if [ "x$TROVE_HOST" = "x" ]; then
echo "ERROR: TROVE_HOST needs to be defined."