aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-06 12:50:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-06 12:50:28 +0200
commit34d1de19782e64c554547db09a5785825dec0bbc (patch)
tree6e0ae58dbf7a1608faca6caf761e8e3b5af6b4f4
parent0a564ee2d9f476b4e3b187c59ee177a321c64991 (diff)
Rename manifest in bootstrap scripts, add backwards-compatibility to agent
-rw-r--r--bbot/agent/agent.cxx12
-rw-r--r--etc/bootstrap/bbot-bootstrap-mingw.bat7
-rw-r--r--etc/bootstrap/bbot-bootstrap-msvc-14.bat7
-rw-r--r--etc/bootstrap/bbot-bootstrap-msvc-15.bat7
-rwxr-xr-xetc/bootstrap/bbot-bootstrap.sh7
5 files changed, 27 insertions, 13 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index e3a674f..6d5f034 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -146,6 +146,12 @@ bootstrap_machine (const dir_path& md,
path mf (arm.path / "bootstrap.manifest");
try_rmfile (mf);
+ // @@ TMP BC: also check for the old manifest name until we migrate all
+ // the machines.
+ //
+ path mfo (arm.path / "manifest");
+ try_rmfile (mfo);
+
// Note that unlike build, here we use the same VM snapshot for retries,
// which is not ideal.
//
@@ -245,8 +251,12 @@ bootstrap_machine (const dir_path& md,
//
for (to = bootstrap_to; to != 0; tftpd.serve (to, 2))
{
- if (file_not_empty (mf))
+ bool old (false);
+ if (file_not_empty (mf) || (old = file_not_empty (mfo)))
{
+ if (old)
+ mf = move (mfo);
+
// Wait for 5 seconds of inactivity. This is our desperate attempt
// at handling interrupted uploads.
//
diff --git a/etc/bootstrap/bbot-bootstrap-mingw.bat b/etc/bootstrap/bbot-bootstrap-mingw.bat
index 00912a8..3257aaf 100644
--- a/etc/bootstrap/bbot-bootstrap-mingw.bat
+++ b/etc/bootstrap/bbot-bootstrap-mingw.bat
@@ -162,12 +162,13 @@ rmdir /S /Q %config%
@if errorlevel 1 goto error
@rem
-@rem Finish off by uploading the result manifest produced by the bbot worker.
+@rem Finish off by uploading the bootstrap result manifest produced by
+@rem the bbot worker.
@rem
-bbot-worker --bootstrap >manifest
+bbot-worker --bootstrap >bootstrap.manifest
@if errorlevel 1 goto error
-curl -s -S --upload-file manifest "tftp://%tftp%/manifest"
+curl -s -S --upload-file bootstrap.manifest "tftp://%tftp%/bootstrap.manifest"
@if errorlevel 1 goto error
shutdown /s /t 5
diff --git a/etc/bootstrap/bbot-bootstrap-msvc-14.bat b/etc/bootstrap/bbot-bootstrap-msvc-14.bat
index 0e129b7..c16ba7a 100644
--- a/etc/bootstrap/bbot-bootstrap-msvc-14.bat
+++ b/etc/bootstrap/bbot-bootstrap-msvc-14.bat
@@ -152,12 +152,13 @@ rmdir /S /Q %config%
@if errorlevel 1 goto error
@rem
-@rem Finish off by uploading the result manifest produced by the bbot worker.
+@rem Finish off by uploading the bootstrap result manifest produced by the
+@rem bbot worker.
@rem
-bbot-worker --bootstrap >manifest
+bbot-worker --bootstrap >bootstrap.manifest
@if errorlevel 1 goto error
-curl -s -S --upload-file manifest "tftp://%tftp%/manifest"
+curl -s -S --upload-file bootstrap.manifest "tftp://%tftp%/bootstrap.manifest"
@if errorlevel 1 goto error
shutdown /s /t 5
diff --git a/etc/bootstrap/bbot-bootstrap-msvc-15.bat b/etc/bootstrap/bbot-bootstrap-msvc-15.bat
index 6e81052..ce3986a 100644
--- a/etc/bootstrap/bbot-bootstrap-msvc-15.bat
+++ b/etc/bootstrap/bbot-bootstrap-msvc-15.bat
@@ -150,12 +150,13 @@ rmdir /S /Q %config%
@if errorlevel 1 goto error
@rem
-@rem Finish off by uploading the result manifest produced by the bbot worker.
+@rem Finish off by uploading the bootstrap result manifest produced by the
+@rem bbot worker.
@rem
-bbot-worker --bootstrap >manifest
+bbot-worker --bootstrap >bootstrap.manifest
@if errorlevel 1 goto error
-curl -s -S --upload-file manifest "tftp://%tftp%/manifest"
+curl -s -S --upload-file bootstrap.manifest "tftp://%tftp%/bootstrap.manifest"
@if errorlevel 1 goto error
shutdown /s /t 5
diff --git a/etc/bootstrap/bbot-bootstrap.sh b/etc/bootstrap/bbot-bootstrap.sh
index 1505a4b..84489a7 100755
--- a/etc/bootstrap/bbot-bootstrap.sh
+++ b/etc/bootstrap/bbot-bootstrap.sh
@@ -134,7 +134,8 @@ run bpkg install bbot
run cd ..
run rm -r "$config"
-# Finish off by uploading the result manifest produced by the bbot worker.
+# Finish off by uploading the bootstrap result manifest produced by the bbot
+# worker.
#
-run bbot-worker --bootstrap >manifest
-run curl -s -S --upload-file manifest "tftp://$tftp/manifest"
+run bbot-worker --bootstrap >bootstrap.manifest
+run curl -s -S --upload-file bootstrap.manifest "tftp://$tftp/bootstrap.manifest"