diff options
author | Andrew Cady <d@jerkface.net> | 2020-10-11 10:42:55 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2020-10-11 10:42:55 -0400 |
commit | a50c1bc9ef4d152b8f6262ef281c4a0c510db822 (patch) | |
tree | 3c8e81d67b4b72c99b7eb724098bfda235df8b2d | |
parent | f49e4f88d55b0340ea69091a2f1a91882f199940 (diff) |
shake "need" debs
-rw-r--r-- | fsmgr.hs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -149,15 +149,16 @@ buildRoot config@DiskImageConfig{..} finalOut = do | |||
149 | forM_ debconfConfig $ | 149 | forM_ debconfConfig $ |
150 | readFile' >=> liftIO . appendFile (mountpoint </> "var/cache/debconf/config.dat") | 150 | readFile' >=> liftIO . appendFile (mountpoint </> "var/cache/debconf/config.dat") |
151 | {- 2. dpkg installs -} | 151 | {- 2. dpkg installs -} |
152 | let (debs, packageNames) = partitionPackages $ unpack . coerce <$> toList packages | 152 | let (fmap dynamicNames -> debs, packageNames) = partitionPackages $ unpack . coerce <$> toList packages |
153 | when (noParent initialImage || not (null packageNames)) $ | 153 | when (noParent initialImage || not (null packageNames)) $ |
154 | -- When there is no parent, selfstrap should install packages marked | 154 | -- When there is no parent, selfstrap should install packages marked |
155 | -- "Required" even if no packages are specified. When there is a parent, | 155 | -- "Required" even if no packages are specified. When there is a parent, |
156 | -- assume that this has already happened. | 156 | -- assume that this has already happened. |
157 | cmd_ "selfstrap" (("--unpack" `consWhen` unpackOnly) ["-t", mountpoint]) (dynamicNames <$> packageNames) | 157 | cmd_ "selfstrap" (("--unpack" `consWhen` unpackOnly) ["-t", mountpoint]) (dynamicNames <$> packageNames) |
158 | when (not $ null debs) $ do | 158 | when (not $ null debs) $ do |
159 | need debs | ||
159 | cmd_ (AddEnv "DEBIAN_FRONTEND" "noninteractive") | 160 | cmd_ (AddEnv "DEBIAN_FRONTEND" "noninteractive") |
160 | ["dpkg"] [if unpackOnly then "--unpack" else "--install"] (dynamicNames <$> debs) | 161 | ["dpkg"] [if unpackOnly then "--unpack" else "--install"] debs |
161 | {- 2.5. install apt package cache -} | 162 | {- 2.5. install apt package cache -} |
162 | when installAptLists $ do | 163 | when installAptLists $ do |
163 | cmd_ "rsync -Ra" (("/./" ++) <$> aptListFiles aptListCfg) (mountpoint ++ "/") | 164 | cmd_ "rsync -Ra" (("/./" ++) <$> aptListFiles aptListCfg) (mountpoint ++ "/") |