aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent
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 /bbot/agent
parent0a564ee2d9f476b4e3b187c59ee177a321c64991 (diff)
Rename manifest in bootstrap scripts, add backwards-compatibility to agent
Diffstat (limited to 'bbot/agent')
-rw-r--r--bbot/agent/agent.cxx12
1 files changed, 11 insertions, 1 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.
//