summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-11-22 00:32:04 -0400
committerJoey Hess2014-11-22 00:32:04 -0400
commite5135c19489ee0799f9408c2336ebf98c6ddadf3 (patch)
tree70aff1852e62698131890f31c414e0a351a79af3 /src/Propellor
parent99e0a5fea733fbeb18ee8fa4556994a50e470b7b (diff)
propellor spin
Diffstat (limited to 'src/Propellor')
-rw-r--r--src/Propellor/Server.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Propellor/Server.hs b/src/Propellor/Server.hs
index eff56997..d6987d2d 100644
--- a/src/Propellor/Server.hs
+++ b/src/Propellor/Server.hs
@@ -76,7 +76,6 @@ updateServer hn hst connect = connect go
hClose toh
hClose fromh
sendPrecompiled hn
- updateServer hn hst connect
Nothing -> return ()
sendRepoUrl :: Handle -> IO ()
@@ -125,14 +124,16 @@ sendGitClone hn = void $ actionMessage ("Clone git repository to " ++ hn) $ do
-- This should be reasonably portable, as long as the remote host has the
-- same architecture as the build host.
sendPrecompiled :: HostName -> IO ()
-sendPrecompiled hn = void $ actionMessage ("Uploading locally compiled propellor as a last resort " ++ hn) $ do
+sendPrecompiled hn = void $ actionMessage ("Uploading locally compiled propellor as a last resort") $ do
cacheparams <- sshCachingParams hn
withTmpDir "propellor" $ \tmpdir ->
bracket getWorkingDirectory changeWorkingDirectory $ \_ -> do
changeWorkingDirectory tmpdir
let shimdir = "propellor"
me <- readSymbolicLink "/proc/self/exe"
- void $ Shim.setup me shimdir
+ shim <- Shim.setup me shimdir
+ when (shim /= shimdir </> "propellor") $
+ renameFile shim (shimdir </> "propellor")
withTmpFile "propellor.tar" $ \tarball _ -> allM id
[ boolSystem "strip" [File me]
, boolSystem "tar" [Param "cf", File tarball, File shimdir]