From 34d1de19782e64c554547db09a5785825dec0bbc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 6 Mar 2018 12:50:28 +0200 Subject: Rename manifest in bootstrap scripts, add backwards-compatibility to agent --- bbot/agent/agent.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'bbot') 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. // -- cgit v1.1