From 481920f28b50451edf75f9f3ea6b59ad55931c95 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 4 Aug 2022 11:24:53 -0700 Subject: [PATCH] Remove modemmanager and udisks2 from cloud images in addition to fwupd. The use of tasks at install means all packages are marked manually installed in the apt database, so removing fwupd does not remove its dependencies. LP: #1981109. --- live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot index d77ae6bb..3d780e6e 100755 --- a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot +++ b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot @@ -93,8 +93,13 @@ fi # Recommends of ubuntu-server that should not be included in cloud images by # default +# unfortunately because we are currently installing ubuntu-server as a task, +# all of the recursive dependencies are marked as manually installed and are +# not subject to autoremoval. There is discussion of us stopping the use of +# tasks in livecd-rootfs but in the meantime, we have to also explicitly +# remove the packages providing the services _xchroot "$rootd" env DEBIAN_FRONTEND=noninteractive \ - apt-get -y autoremove --purge fwupd + apt-get -y autoremove --purge fwupd modemmanager udisks2 if [ "${SUBPROJECT:-}" = minimized ]; then # Remove various packages that we don't want in the minimized images.