From b16f32f48c0555c9007225f3028fc5a0e25ac85d Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Fri, 4 Oct 2019 21:25:11 -0400 Subject: save dpkg -l output in _build/name.pkgs.txt --- fsmgr.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fsmgr.hs') 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 {- 4. custom setup commands -} forM_ chrootCommands $ \c -> do cmd_ "chroot" [mountpoint] "/bin/sh -c" [unpack c] + cmd_ "chroot" [mountpoint] "/bin/sh -c" ["[ $(grep -c '^Package: base-files' /var/lib/dpkg/status) = 1 ]"] + Stdout (pkgList :: String) <- cmd "chroot" [mountpoint] "dpkg -l" + writeFileChanged (finalOut -<.> "pkgs.txt") pkgList {- 5. create a backup snapshot -} cmd_ "umount" [mountpoint] cmd_ "mount -t btrfs -o subvol=/" [out, mountpoint] -- cgit v1.2.3