Skip to content

Commit e8d7426

Browse files
committed
images: report all packages installed at end
1 parent 98fa5e9 commit e8d7426

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

ebssurrogate/scripts/nix-provision.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ function cleanup_nix {
7777
nix-store --optimise -v
7878
}
7979

80+
function report_packages {
81+
# shellcheck disable=SC2016
82+
dpkg-query -W -f='${Package}\t${Version}\t${Architecture}\n' | LC_COLLATE=C.UTF-8 sort
83+
find /nix/store -max-depth 1 | LC_COLLATE=C.UTF-8 sort -t- -k2
84+
}
85+
8086
function report_disk_usage {
8187
read -r dub _ < <(du -sx -B1 /)
8288
read -r duh _ < <(du -sx -h /)
@@ -88,4 +94,5 @@ install_nix
8894
execute_stage2_playbook
8995
cleanup_packages
9096
cleanup_nix
97+
report_packages
9198
report_disk_usage

ebssurrogate/scripts/qemu-bootstrap-nix.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@ function clean_nix {
191191
nix-store --optimise -v
192192
}
193193

194+
function report_packages {
195+
# shellcheck disable=SC2016
196+
dpkg-query -W -f='${Package}\t${Version}\t${Architecture}\n' | LC_COLLATE=C.UTF-8 sort
197+
find /nix/store -max-depth 1 | LC_COLLATE=C.UTF-8 sort -t- -k2
198+
}
199+
194200
function report_disk_usage {
195201
read -r dub _ < <(du -sx -B1 /)
196202
read -r duh _ < <(du -sx -h /)
@@ -218,4 +224,5 @@ execute_stage2_playbook
218224
clean_legacy_things
219225
clean_system
220226
clean_nix
227+
report_packages
221228
report_disk_usage

ebssurrogate/scripts/surrogate-bootstrap-nix.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ function clean_system {
379379
rm -rf /mnt/usr/share/doc
380380
}
381381

382+
function report_packages {
383+
# shellcheck disable=SC2016
384+
chroot /mnt dpkg-query -W -f='${Package}\t${Version}\t${Architecture}\n' | LC_COLLATE=C.UTF-8 sort
385+
}
386+
382387
# Unmount bind mounts
383388
function umount_reset_mappings {
384389
umount -l /mnt/dev
@@ -413,4 +418,5 @@ setup_chroot_environment
413418
execute_playbook
414419
update_systemd_services
415420
clean_system
421+
report_packages
416422
umount_reset_mappings

0 commit comments

Comments
 (0)