summaryrefslogtreecommitdiff
path: root/fsmgr.hs
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-10-04 21:25:11 -0400
committerAndrew Cady <d@jerkface.net>2019-10-04 21:25:11 -0400
commitb16f32f48c0555c9007225f3028fc5a0e25ac85d (patch)
treec47f8247e8414be028805681fd810398d97166f4 /fsmgr.hs
parent421134b9ad83e8e63eac2ecdf208e97404af5fb0 (diff)
save dpkg -l output in _build/name.pkgs.txt
Diffstat (limited to 'fsmgr.hs')
-rw-r--r--fsmgr.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/fsmgr.hs b/fsmgr.hs
index bb5891e..d28c0e4 100644
--- a/fsmgr.hs
+++ b/fsmgr.hs
@@ -83,6 +83,9 @@ buildRoot config@DiskImageConfig{..} finalOut = do
83 {- 4. custom setup commands -} 83 {- 4. custom setup commands -}
84 forM_ chrootCommands $ \c -> do 84 forM_ chrootCommands $ \c -> do
85 cmd_ "chroot" [mountpoint] "/bin/sh -c" [unpack c] 85 cmd_ "chroot" [mountpoint] "/bin/sh -c" [unpack c]
86 cmd_ "chroot" [mountpoint] "/bin/sh -c" ["[ $(grep -c '^Package: base-files' /var/lib/dpkg/status) = 1 ]"]
87 Stdout (pkgList :: String) <- cmd "chroot" [mountpoint] "dpkg -l"
88 writeFileChanged (finalOut -<.> "pkgs.txt") pkgList
86 {- 5. create a backup snapshot -} 89 {- 5. create a backup snapshot -}
87 cmd_ "umount" [mountpoint] 90 cmd_ "umount" [mountpoint]
88 cmd_ "mount -t btrfs -o subvol=/" [out, mountpoint] 91 cmd_ "mount -t btrfs -o subvol=/" [out, mountpoint]