git-annex.cabal: Add back custom-setup stanza, so cabal new-build works.

Seems I had all the work in past commits to make this build, at least on
linux. I'm actually surprised it does, without a unix dep, Utility.Env
still builds ok somehow despite using System.Posix.Env.

This commit was sponsored by Fernando Jimenez on Patreon.
This commit is contained in:
Joey Hess 2017-12-31 13:54:41 -04:00
parent 8d71441bcd
commit 51228c2306
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 62 additions and 30 deletions

11
Test.hs
View file

@ -83,6 +83,7 @@ import qualified Utility.Process
import qualified Utility.Misc
import qualified Utility.InodeCache
import qualified Utility.Env
import qualified Utility.Env.Set
import qualified Utility.Matcher
import qualified Utility.Exception
import qualified Utility.Hash
@ -130,7 +131,7 @@ runner = Just go
subenv = "GIT_ANNEX_TEST_SUBPROCESS"
runsubprocesstests opts Nothing = do
pp <- Annex.Path.programPath
Utility.Env.setEnv subenv "1" True
Utility.Env.Set.setEnv subenv "1" True
ps <- getArgs
(Nothing, Nothing, Nothing, pid) <-createProcess (proc pp ps)
exitcode <- waitForProcess pid
@ -1919,9 +1920,9 @@ ensuretmpdir = do
isolateGitConfig :: IO a -> IO a
isolateGitConfig a = Utility.Tmp.withTmpDir "testhome" $ \tmphome -> do
tmphomeabs <- absPath tmphome
Utility.Env.setEnv "HOME" tmphomeabs True
Utility.Env.setEnv "XDG_CONFIG_HOME" tmphomeabs True
Utility.Env.setEnv "GIT_CONFIG_NOSYSTEM" "1" True
Utility.Env.Set.setEnv "HOME" tmphomeabs True
Utility.Env.Set.setEnv "XDG_CONFIG_HOME" tmphomeabs True
Utility.Env.Set.setEnv "GIT_CONFIG_NOSYSTEM" "1" True
a
cleanup :: FilePath -> IO ()
@ -2107,7 +2108,7 @@ setTestMode testmode = do
currdir <- getCurrentDirectory
p <- Utility.Env.getEnvDefault "PATH" ""
mapM_ (\(var, val) -> Utility.Env.setEnv var val True)
mapM_ (\(var, val) -> Utility.Env.Set.setEnv var val True)
-- Ensure that the just-built git annex is used.
[ ("PATH", currdir ++ [searchPathSeparator] ++ p)
, ("TOPDIR", currdir)