diff options
author | Andrew Cady <d@jerkface.net> | 2019-10-04 21:25:11 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-10-04 21:25:11 -0400 |
commit | b16f32f48c0555c9007225f3028fc5a0e25ac85d (patch) | |
tree | c47f8247e8414be028805681fd810398d97166f4 | |
parent | 421134b9ad83e8e63eac2ecdf208e97404af5fb0 (diff) |
save dpkg -l output in _build/name.pkgs.txt
-rw-r--r-- | fsmgr.hs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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] |