summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/DiskImage.hs
diff options
context:
space:
mode:
authorJoey Hess2015-09-02 15:23:47 -0700
committerJoey Hess2015-09-02 15:23:47 -0700
commitfe59ea1a62ff8dd15e30646802b9ca045df3008b (patch)
treefcceba43ff80d83fdd50d1aeb8407db47aa92145 /src/Propellor/Property/DiskImage.hs
parent418e6a5b4ee36360911cdff14f70357c5c2bfc80 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/DiskImage.hs')
-rw-r--r--src/Propellor/Property/DiskImage.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs
index 86be3a9b..1d087cc0 100644
--- a/src/Propellor/Property/DiskImage.hs
+++ b/src/Propellor/Property/DiskImage.hs
@@ -88,9 +88,9 @@ imageBuilt' rebuild img mkchroot mkparttable final =
liftIO $ unmountBelow chrootdir
szm <- M.mapKeys (toSysDir chrootdir) . M.map toPartSize
<$> liftIO (dirSizes chrootdir)
+ let calcsz = \mnts -> saneSz . fromMaybe defSz . getMountSz szm mnts
-- tie the knot!
- -- TODO if any size is < 1 MB, use 1 MB for sanity
- let (mnts, t) = mkparttable (map (saneSz . fromMaybe defSz . getMountSz szm mnts) mnts)
+ let (mnts, t) = mkparttable (map (calcsz mnts) mnts)
liftIO $ print (mnts, t)
ensureProperty $
imageExists img (partTableSize t)