From 043cd2218efb8e3d2f04ae2faff38293a01ed0c5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Jul 2017 11:10:27 -0400 Subject: Revert "disable buffering earlier" This reverts commit 632137836b39462883483a621f9dd696ce1d73cc. Still failing :( Seems that disabling buffering is not the solution. --- src/Propellor/Spin.hs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/Propellor/Spin.hs') diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs index 732ec9b7..7146ad4c 100644 --- a/src/Propellor/Spin.hs +++ b/src/Propellor/Spin.hs @@ -5,7 +5,6 @@ module Propellor.Spin ( spin, spin', update, - updatePrepare, gitPushHelper, mergeSpin, ) where @@ -350,20 +349,14 @@ findLastNonSpinCommit = do spinCommitMessage :: String spinCommitMessage = "propellor spin" --- Avoid buffering anything read from stdin, so that --- when gitPullFromUpdateServer runs git fetch, it sees all the data --- it expects to. --- --- Should be called very early in propellor start, before anything reads --- from stdin. -updatePrepare :: IO () -updatePrepare = hSetBuffering stdin NoBuffering - -- Stdin and stdout are connected to the updateServer over ssh. -- Request that it run git upload-pack, and connect that up to a git fetch -- to receive the data. gitPullFromUpdateServer :: IO () gitPullFromUpdateServer = reqMarked NeedGitPush gitPushMarker $ \_ -> do + -- Note that this relies on data not being buffered in the stdin + -- Handle, since such buffered data would not be available in the + -- FD passed to git fetch. hin <- dup stdInput hout <- dup stdOutput hClose stdin -- cgit v1.2.3