diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-09-02 15:23:47 -0700 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-09-02 15:23:47 -0700 |
| commit | fe59ea1a62ff8dd15e30646802b9ca045df3008b (patch) | |
| tree | fcceba43ff80d83fdd50d1aeb8407db47aa92145 /src/Propellor/Property/DiskImage.hs | |
| parent | 418e6a5b4ee36360911cdff14f70357c5c2bfc80 (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Property/DiskImage.hs')
| -rw-r--r-- | src/Propellor/Property/DiskImage.hs | 4 |
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) |
