summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Debootstrap.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-22 22:37:25 -0400
committerJoey Hess2014-11-22 22:37:25 -0400
commit5fefb161c388f72fa598c238295ce1f051cc0029 (patch)
treededa74d1b11a02a2cc3c9a2390e51b6b9d3b0f43 /src/Propellor/Property/Debootstrap.hs
parentca09087caf5298b01f05bae4a4601fce47966c4f (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/Debootstrap.hs')
-rw-r--r--src/Propellor/Property/Debootstrap.hs14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs
index 32e892bb..ab5bddf4 100644
--- a/src/Propellor/Property/Debootstrap.hs
+++ b/src/Propellor/Property/Debootstrap.hs
@@ -8,6 +8,7 @@ module Propellor.Property.Debootstrap (
import Propellor
import qualified Propellor.Property.Apt as Apt
+import Propellor.Property.Chroot.Util
import Utility.Path
import Utility.SafeCommand
import Utility.FileMode
@@ -78,7 +79,7 @@ built target system@(System _ arch) config =
, Param target
]
cmd <- fromMaybe "debootstrap" <$> programPath
- de <- debootstrapEnv
+ de <- standardPathEnv
ifM (boolSystemEnv cmd params (Just de))
( do
fixForeignDev target
@@ -234,15 +235,6 @@ makeWrapperScript dir = do
]
modifyFileMode wrapperScript (addModes $ readModes ++ executeModes)
--- workaround for http://bugs.debian.org/770658
-debootstrapEnv :: IO [(String, String)]
-debootstrapEnv = do
- path <- getEnvDefault "PATH" "/bin"
- addEntry "PATH" (path ++ debianPath)
- <$> getEnvironment
- where
- debianPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-
-- Work around for http://bugs.debian.org/770217
makeDevicesTarball :: IO ()
makeDevicesTarball = do
@@ -257,7 +249,7 @@ makeDevicesTarball = do
fixForeignDev :: FilePath -> IO ()
fixForeignDev target = whenM (doesFileExist (target ++ foreignDevFlag)) $ do
- de <- debootstrapEnv
+ de <- standardPathEnv
void $ boolSystemEnv "chroot"
[ File target
, Param "sh"