remove workaround for old versions of process

ghc 8.4.4 has process 1.6.3, which was the first version to include
getPid.
This commit is contained in:
Joey Hess 2020-06-03 16:03:08 -04:00
parent 92f775eba0
commit c429bbf2bd
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 4 additions and 7 deletions

View file

@ -29,7 +29,6 @@ import qualified P2P.Annex as P2P
import Control.Concurrent.STM
import Control.Concurrent.Async
import qualified Data.ByteString as B
import Data.Unique
toRepo :: ConsumeStdin -> Git.Repo -> RemoteGitConfig -> SshCommand -> Annex (FilePath, [CommandParam])
toRepo cs r gc remotecmd = do
@ -262,16 +261,14 @@ openP2PSshConnection r connpool = do
, std_out = CreatePipe
, std_err = CreatePipe
}
-- Could use getPid, but need to build with older versions
-- of process, so instead a unique connection number.
connnum <- hashUnique <$> newUnique
pidnum <- getPid pid
let conn = P2P.P2PConnection
{ P2P.connRepo = repo
, P2P.connCheckAuth = const False
, P2P.connIhdl = to
, P2P.connOhdl = from
, P2P.connIdent = P2P.ConnIdent $
Just $ "ssh connection " ++ show connnum
Just $ "ssh connection " ++ show pidnum
}
stderrhandlerst <- newStderrHandler err
runst <- P2P.mkRunState P2P.Client

View file

@ -297,7 +297,7 @@ custom-setup
Setup-Depends: base (>= 4.11.1.0), hslogger, split, unix-compat,
filepath, exceptions, bytestring, directory, IfElse, data-default,
filepath-bytestring (>= 1.4.2.1.1),
process (>= 1.6),
process (>= 1.6.3),
utf8-string, transformers, Cabal
Executable git-annex
@ -311,7 +311,7 @@ Executable git-annex
stm (>= 2.3),
mtl (>= 2),
uuid (>= 1.2.6),
process (>= 1.6),
process (>= 1.6.3),
data-default,
case-insensitive,
random,