Address the fact that debootstrap doesn't follow Recommends and as a result we're missing several Recommends that should be installed by default and are on upgrades but not on new installs. This is not applied to minimized images, which don't follow Recommends; but does get separately applied to the ubuntu-server full squashfs.

This commit is contained in:
Steve Langasek 2023-02-24 17:47:51 -08:00
parent 3fa9d74b79
commit 4dbeba4ba3
3 changed files with 27 additions and 0 deletions

10
debian/changelog vendored
View File

@ -1,3 +1,13 @@
livecd-rootfs (2.802) UNRELEASED; urgency=medium
* Address the fact that debootstrap doesn't follow Recommends and as a
result we're missing several Recommends that should be installed by
default and are on upgrades but not on new installs. This is not
applied to minimized images, which don't follow Recommends; but does get
separately applied to the ubuntu-server full squashfs.
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 24 Feb 2023 17:46:47 -0800
livecd-rootfs (2.801) lunar; urgency=medium
[ Heinrich Schuchardt ]

View File

@ -327,6 +327,16 @@ EOF
chmod +x chroot/usr/bin/man
fi
if [ "${SUBPROJECT:-}" != minimized ] \
&& [ "${PROJECT}" != "ubuntu-server" ]
then
# debootstrap doesn't handle Recommends and fixing this is
# non-trivial, so install missing Recommends here
echo "Installing any missing recommends"
Chroot chroot "env DEBIAN_FRONTEND=noninteractive \
apt-get -y --fix-policy install"
fi
if [ -n "${PASSES}" ]; then
PATH="config/:$PATH" lb chroot_layered "$@"
else

View File

@ -18,3 +18,10 @@ ln -s /bin/true /usr/bin/snap
yes | /usr/local/sbin/unminimize
rm /usr/bin/snap
dpkg-divert --remove --rename /usr/bin/snap
# Fix up missing recommends. Other non-layered flavors handle this in
# live-build/auto/build, but we need to do it here. Also, there are
# additional recommends missing from server-minimal that wouldn't be
# corrected by a fix to debootstrap to handle Recommends.
echo "Installing any missing recommends"
env DEBIAN_FRONTEND=noninteractive apt-get -y --fix-policy install