diff --git a/debian/changelog b/debian/changelog index 5f77be3a..10d8898d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ livecd-rootfs (2.750) UNRELEASED; urgency=medium * Do not look for a base snap on snaps of type base, because recursive dependencies are not allowed for snaps. LP: #1957123. + * Treat it as a fatal error if we are asked to install a snap that would + pull in the core snap. Ubuntu 20.04 and Ubuntu 22.04 official images + should never require snaps that depend on an Ubuntu 16.04 runtime, this + indicates a misconfiguration that will bloat the install. -- Steve Langasek Tue, 11 Jan 2022 15:38:05 -0800 diff --git a/live-build/functions b/live-build/functions index 652b6382..e0e17a3e 100644 --- a/live-build/functions +++ b/live-build/functions @@ -597,8 +597,12 @@ _snap_preseed() { if [ "$snap_type" != base ]; then local core_snap=$(echo "$snap_info" | awk '/^base:/ {print $2}') - # If snap info does not list a base use 'core' - core_snap=${core_snap:-core} + # If snap info does not list a base the default is 'core' + # which is now an error to use. + if [ -z "$core_snap" ]; then + echo "Legacy snap with no base declaration found, refusing to install 'core' snap" + exit 1 + fi _snap_preseed $CHROOT_ROOT $core_snap stable fi