summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Debootstrap.hs
diff options
context:
space:
mode:
authorJoey Hess2015-09-03 08:53:40 -0700
committerJoey Hess2015-09-03 08:54:06 -0700
commit43a67e310740e58707d0a7908237641ef46f5ae6 (patch)
tree89df6bbb593bc85f8a443316c16dd4cd893f97d1 /src/Propellor/Property/Debootstrap.hs
parentf158d1cf81c2fe4ece5320dd725496043e5b953d (diff)
parent776b4dc3b24f8d30fa0fe56254c16e613d8e0bbe (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Debootstrap.hs')
-rw-r--r--src/Propellor/Property/Debootstrap.hs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs
index 8d974eba..a46451ef 100644
--- a/src/Propellor/Property/Debootstrap.hs
+++ b/src/Propellor/Property/Debootstrap.hs
@@ -13,7 +13,6 @@ module Propellor.Property.Debootstrap (
import Propellor
import qualified Propellor.Property.Apt as Apt
import Propellor.Property.Chroot.Util
-import Propellor.Property.Mount
import Utility.Path
import Utility.FileMode
@@ -61,7 +60,7 @@ built target system config = built' (toProp installed) target system config <!>
teardown = check (not <$> unpopulated target) teardownprop
teardownprop = property ("removed debootstrapped " ++ target) $
- makeChange (removetarget target)
+ makeChange (removeChroot target)
built' :: (Combines (Property NoInfo) (Property i)) => Property i -> FilePath -> System -> DebootstrapConfig -> Property (CInfo NoInfo i)
built' installprop target system@(System _ arch) config =
@@ -96,7 +95,7 @@ built' installprop target system@(System _ arch) config =
-- recover by deleting it and trying again.
ispartial = ifM (doesDirectoryExist (target </> "debootstrap"))
( do
- removetarget target
+ removeChroot target
return True
, return False
)
@@ -104,12 +103,6 @@ built' installprop target system@(System _ arch) config =
unpopulated :: FilePath -> IO Bool
unpopulated d = null <$> catchDefaultIO [] (dirContents d)
-removetarget :: FilePath -> IO ()
-removetarget target = do
- submnts <- mountPointsBelow target
- forM_ submnts umountLazy
- removeDirectoryRecursive target
-
extractSuite :: System -> Maybe String
extractSuite (System (Debian s) _) = Just $ Apt.showSuite s
extractSuite (System (Ubuntu r) _) = Just r