From 851f7ebb8d598d9379a275df9b13303d3ac6d521 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Sep 2015 15:44:47 -0700 Subject: propellor spin --- src/Propellor/Property/DiskImage.hs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs index 384718ca..2c222cb2 100644 --- a/src/Propellor/Property/DiskImage.hs +++ b/src/Propellor/Property/DiskImage.hs @@ -23,6 +23,7 @@ module Propellor.Property.DiskImage ( Finalization, grubBooted, Grub.BIOS(..), + noFinalization, ) where import Propellor @@ -31,6 +32,7 @@ import Propellor.Property.Chroot.Util (removeChroot) import qualified Propellor.Property.Chroot as Chroot import qualified Propellor.Property.Grub as Grub import qualified Propellor.Property.File as File +import qualified Propellor.Property.Apt as Apt import Propellor.Property.Parted import Propellor.Property.Mount import Utility.Path @@ -73,14 +75,18 @@ imageBuilt' rebuild img mkchroot mkparttable final = (mkimg unmkimg) -- TODO snd final -- TODO copy in - -- TODO chroot topevel directory perm fixup - `requires` Chroot.provisioned (mkchroot chrootdir & fst final) + `requires` Chroot.provisioned chroot `requires` (cleanrebuild doNothing) `describe` desc where desc = "built disk image " ++ img unmkimg = File.notPresent img chrootdir = img ++ ".chroot" + chroot = mkchroot chrootdir + -- Run first stage finalization. + & fst final + -- Avoid wasting disk image space on the apt cache + & Apt.cacheCleaned mkimg = property desc $ do -- unmount helper filesystems such as proc from the chroot -- before getting sizes @@ -223,3 +229,6 @@ type Finalization = (Property NoInfo, Property NoInfo) -- | Makes grub be the boot loader of the disk image. grubBooted :: Grub.BIOS -> Finalization grubBooted bios = (Grub.installed bios, undefined) + +noFinalization :: Finalization +noFinalization = (doNothing, doNothing) -- cgit v1.2.3