From fe59ea1a62ff8dd15e30646802b9ca045df3008b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Sep 2015 15:23:47 -0700 Subject: propellor spin --- src/Propellor/Property/DiskImage.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/DiskImage.hs') 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) -- cgit v1.3-2-g0d8e