livecd-rootfs/minimize-manual
CloudBuilder 8c127ebec1 Imported 23.10.37 from mantic-release pocket.
No reason for CPC update specified.
2023-09-16 15:51:08 +00:00

17 lines
460 B
Bash
Executable File

#!/bin/sh
# Minimize the number of manually installed packages in the image
# Finds all packages which could be marked as automatically installed and marks
# them as such
set -e
chroot_directory=$1
auto_packages=$(/usr/share/livecd-rootfs/auto-markable-pkgs $chroot_directory)
if [ -n "$auto_packages" ]; then
chroot $chroot_directory apt-mark auto $auto_packages
fi
[ -z "$(/usr/share/livecd-rootfs/auto-markable-pkgs $chroot_directory 2> /dev/null)" ]