diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-09-02 11:52:39 -0700 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-09-02 11:52:39 -0700 |
| commit | ed42227b115ed1adf2e88b57bad8a7744d9cb240 (patch) | |
| tree | af65470df9e1d596524d99d353372cfc7e2503a7 /src/Propellor | |
| parent | 5dce06cbb83d69f7c1c85f1cbc6ccf1382c774d4 (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor')
| -rw-r--r-- | src/Propellor/Property/DiskImage.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs index 99c9b14b..5cef449b 100644 --- a/src/Propellor/Property/DiskImage.hs +++ b/src/Propellor/Property/DiskImage.hs @@ -77,7 +77,8 @@ built' rebuild img mkchroot mkparttable final = -- unmount helper filesystems such as proc from the chroot -- before getting sizes liftIO $ unmountBelow chrootdir - szm <- liftIO $ M.map toPartSize <$> dirSizes chrootdir + szm <- liftIO $ M.mapKeys tosysdir . M.map toPartSize + <$> dirSizes chrootdir -- tie the knot! let (mnts, t) = mkparttable (map (getMountSz szm) mnts) liftIO $ print (mnts, t, map (getMountSz szm) mnts, szm) @@ -91,6 +92,10 @@ built' rebuild img mkchroot mkparttable final = return MadeChange | otherwise = doNothing + tosysdir d = case makeRelative chrootdir d of + "." -> "/" + sysdir -> "/" ++ sysdir + -- | Ensures that a disk image file of the specified size exists. -- -- If the file doesn't exist, or is too small, creates a new one, full of 0's. |
