From edc244249a6f264c606e61f804bf6c49a7f7ee55 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Fri, 4 Mar 2022 13:57:09 +0100 Subject: [PATCH 1/2] Allow to install core snap optionally Commit 245f7772bdb74 added code to abort the build if a snap wants to install "core" (the 16.04 runtime). That's great but there are still some CPC maintained image builds that use snaps based on "core". So make it possible to continue the build if the "ALLOW_CORE_SNAP" env variable is set. (cherry picked from commit 34735684d5208981b2413047f67ee4c363d718d8) --- live-build/functions | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/live-build/functions b/live-build/functions index d452d991..675fd819 100644 --- a/live-build/functions +++ b/live-build/functions @@ -562,8 +562,13 @@ _snap_preseed() { # 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 + if [ -z "$ALLOW_CORE_SNAP" ]; then + echo "Legacy snap with no base declaration found, refusing to install 'core' snap" + exit 1 + else + echo "Legacy snap with no base declaration found, but \$ALLOW_CORE_SNAP set. continue (but FIX YOUR SNAPS!)" + core_snap=${core_snap:-core} + fi fi _snap_preseed $CHROOT_ROOT $core_snap stable From 4ec6cefabe82837b0a3c4fd97f397e1859fc186a Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Wed, 9 Mar 2022 10:49:17 +0100 Subject: [PATCH 2/2] Update debian/changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index afa19fe8..f5df237d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.664.41) UNRELEASED; urgency=medium + + * Optionally (when ALLOW_CORE_SNAP env var is set) allow to install core + snap. Still needed by some CPC projects. (LP: #1964303) + + -- Thomas Bechtold Fri, 04 Mar 2022 14:00:16 +0100 + livecd-rootfs (2.664.40) focal; urgency=medium * Unset `initrdless_boot_fallback_triggered` in /boot/grub/grubenv instead