diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-06 18:15:00 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-06 18:15:00 -0400 |
| commit | 4bbab3db9856b1c3fb4403add8b391179baf29c6 (patch) | |
| tree | b8b3ae409aef1bdad15b906703f3adae838f8c2a /src/Propellor/Spin.hs | |
| parent | 7899f23d991aa901c110b5bf276c0c7fb165799a (diff) | |
stop using --continue SimpleRun for spin
When spinning a remote host, we do want to rebuild propellor on it,
and this use of --continue that did a rebuild was different from all the
other uses of --continue that avoided a rebuild.
This fixes a build loop involving that special case. When --continue
SimpleRun ran a rebuild, it re-execed propellor with --continue SimpleRun,
and so would rebuild again, and re-exec again if the binary kept changing.
Backwards compatability should be ok; old versions of propellor,
when run with --serialized SimpleRun by the new version, do a buildFirst,
followed by another (redundant) buildFirst, and then run. The one redundant
buildFirst is not a problem in the upgrade scenario.
(Unfortunately, I can't rename SimpleRun to something nicer despite only
spin using it; backwards compatability does prevent that.)
Diffstat (limited to 'src/Propellor/Spin.hs')
| -rw-r--r-- | src/Propellor/Spin.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs index 6246b04f..495ebaf4 100644 --- a/src/Propellor/Spin.hs +++ b/src/Propellor/Spin.hs @@ -112,9 +112,10 @@ spin' mprivdata relay target hst = do ] runcmd = "cd " ++ localdir ++ " && ./propellor " ++ cmd - cmd = if viarelay - then "--serialized " ++ shellEscape (show (Spin [target] (Just target))) - else "--continue " ++ shellEscape (show (SimpleRun target)) + cmd = "--serialized " ++ shellEscape (show cmdline) + cmdline + | viarelay = Spin [target] (Just target) + | otherwise = SimpleRun target getprivdata = case mprivdata of Nothing |
