summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-11-22 21:30:50 -0400
committerJoey Hess2014-11-22 21:30:50 -0400
commit1d5d911aa09297c2f9d4e6db1f9437ff8c014a74 (patch)
tree11a65a824d5c52b6f26922372b7a8575818c5bdf /src/Propellor
parent3f98cdbcede83c9a042d86df450dfe0b995c6dc8 (diff)
propellor spin
Diffstat (limited to 'src/Propellor')
-rw-r--r--src/Propellor/Property/Debootstrap.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs
index fe87cc27..2ba9faac 100644
--- a/src/Propellor/Property/Debootstrap.hs
+++ b/src/Propellor/Property/Debootstrap.hs
@@ -78,7 +78,8 @@ built target system@(System _ arch) config =
, Param target
]
cmd <- fromMaybe "debootstrap" <$> programPath
- ifM (boolSystem cmd params)
+ de <- debootstrapEnv
+ ifM (boolSystemEnv cmd params (Just de))
( do
fixForeignDev target
return MadeChange
@@ -107,6 +108,15 @@ built target system@(System _ arch) config =
, return False
)
+-- workaround for http://bugs.debian.org/770658
+debootstrapEnv :: IO [(String, String)]
+debootstrapEnv = do
+ path <- getEnvDefault "/bin" "PATH"
+ addEntry "PATH" (path ++ debianPath)
+ <$> getEnvironment
+ where
+ debianPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
mountPoints :: IO [FilePath]
mountPoints = lines <$> readProcess "findmnt" ["-rn", "--output", "target"]