summaryrefslogtreecommitdiff
path: root/fsmgr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'fsmgr.hs')
-rw-r--r--fsmgr.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/fsmgr.hs b/fsmgr.hs
index 948ef8b..834ab4a 100644
--- a/fsmgr.hs
+++ b/fsmgr.hs
@@ -147,6 +147,10 @@ buildRoot config@DiskImageConfig{..} finalOut = do
147 {- 1. debconf -} 147 {- 1. debconf -}
148 forM_ debconfConfig $ 148 forM_ debconfConfig $
149 readFile' >=> liftIO . appendFile (mountpoint </> "var/cache/debconf/config.dat") 149 readFile' >=> liftIO . appendFile (mountpoint </> "var/cache/debconf/config.dat")
150 {- 1.5. install apt package cache -}
151 when installAptLists $ do
152 cmd_ "rsync -Ra" (("/./" ++) <$> aptListFiles aptListCfg) (mountpoint ++ "/")
153 cmd_ "chroot" [mountpoint] "/bin/sh -c" ["apt-cache dumpavail | dpkg --update-avail -"]
150 {- 2. dpkg installs -} 154 {- 2. dpkg installs -}
151 let (fmap dynamicNames -> debs, packageNames) = partitionPackages $ unpack . coerce <$> toList packages 155 let (fmap dynamicNames -> debs, packageNames) = partitionPackages $ unpack . coerce <$> toList packages
152 when (noParent initialImage || not (null packageNames)) $ 156 when (noParent initialImage || not (null packageNames)) $
@@ -158,9 +162,6 @@ buildRoot config@DiskImageConfig{..} finalOut = do
158 need debs 162 need debs
159 cmd_ (AddEnv "DEBIAN_FRONTEND" "noninteractive") 163 cmd_ (AddEnv "DEBIAN_FRONTEND" "noninteractive")
160 ["dpkg"] [if unpackOnly then "--unpack" else "--install"] ["--root", mountpoint] debs 164 ["dpkg"] [if unpackOnly then "--unpack" else "--install"] ["--root", mountpoint] debs
161 {- 2.5. install apt package cache -}
162 when installAptLists $ do
163 cmd_ "rsync -Ra" (("/./" ++) <$> aptListFiles aptListCfg) (mountpoint ++ "/")
164 {- 3. binaries -} 165 {- 3. binaries -}
165 let go b = do 166 let go b = do
166 p <- fromMaybe (fail $ "not found in ${PATH}: " ++ b) <$> liftIO (pathLocate b) 167 p <- fromMaybe (fail $ "not found in ${PATH}: " ++ b) <$> liftIO (pathLocate b)