summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2016-03-28 04:56:42 -0400
committerJoey Hess2016-03-28 04:56:42 -0400
commit1bd062c5336db6aff3b6128f7821f8ebed6b6ca0 (patch)
tree88e47198b4a39bbad5c04d24af9bde55a814a5c2 /src
parent434b3e8b325be7cd04c4130e80be19dc57f27d0f (diff)
one more
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/DiskImage.hs9
-rw-r--r--src/Propellor/Property/OS.hs4
2 files changed, 5 insertions, 8 deletions
diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs
index 8c027b05..718768c2 100644
--- a/src/Propellor/Property/DiskImage.hs
+++ b/src/Propellor/Property/DiskImage.hs
@@ -118,12 +118,9 @@ imageBuilt' rebuild img mkchroot tabletype final partspec =
-- disk image. It cleans any caches of information that can be omitted;
-- eg the apt cache on Debian.
cachesCleaned :: Property UnixLike
-cachesCleaned = withOS "cache cleaned" $ \w o ->
- let aptclean = ensureProperty w Apt.cacheCleaned
- in case o of
- (Just (System (Debian _) _)) -> aptclean
- (Just (System (Buntish _) _)) -> aptclean
- _ -> noChange
+cachesCleaned = "cache cleaned" ==> (Apt.cacheCleaned `pickOS` skipit)
+ where
+ skipit = doNothing :: Property UnixLike
-- | Builds a disk image from the contents of a chroot.
imageBuiltFrom :: DiskImage -> FilePath -> TableType -> Finalization -> [PartSpec] -> RevertableProperty (HasInfo + Linux) UnixLike
diff --git a/src/Propellor/Property/OS.hs b/src/Propellor/Property/OS.hs
index 7d0a10ca..5a3ccc70 100644
--- a/src/Propellor/Property/OS.hs
+++ b/src/Propellor/Property/OS.hs
@@ -93,8 +93,8 @@ cleanInstallOnce confirmation = check (not <$> doesFileExist flagfile) $
debootstrap :: System -> Property Linux
debootstrap targetos =
- -- Ignore the os setting, and install debootstrap from
- -- source, since we don't know what OS we're running in yet.
+ -- Install debootstrap from source, since we don't know
+ -- what OS we're currently running in.
Debootstrap.built' Debootstrap.sourceInstall
newOSDir targetos Debootstrap.DefaultConfig
-- debootstrap, I wish it was faster..