diff --git a/debian/changelog b/debian/changelog index 7f8a720e..3bf713a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ livecd-rootfs (2.525.41) UNRELEASED; urgency=medium * Use snap cli rather than custom snap-tool (LP: #1864252) + * Address snap base regression after snap-tool removal - -- Robert C Jennings Fri, 21 Feb 2020 20:21:31 -0600 + -- Robert C Jennings Thu, 27 Feb 2020 16:39:52 -0600 livecd-rootfs (2.525.40) bionic; urgency=medium diff --git a/live-build/functions b/live-build/functions index ea47c8d1..1d9a9427 100644 --- a/live-build/functions +++ b/live-build/functions @@ -439,12 +439,16 @@ _snap_preseed() { return fi + # Pre-seed snap's base case $SNAP_NAME in snapd) # snapd is self-contained, ignore base ;; + core|core[0-9][0-9]) + # core and core## are self-contained, ignore base + ;; *) - # Determine if and what core snap is needed + # Determine which core snap is needed local snap_info snap_info=$(snap info --verbose "${SNAP_NAME}") @@ -456,11 +460,10 @@ _snap_preseed() { local core_snap=$(echo "$snap_info" | grep '^base:' | awk '{print $2}') - # If $core_snap is not the empty string then SNAP itself is not a core - # snap and we must additionally seed the core snap. - if [ -n "$core_snap" ]; then - _snap_preseed $CHROOT_ROOT $core_snap stable - fi + # If snap info does not list a base use 'core' + core_snap=${core_snap:-core} + + _snap_preseed $CHROOT_ROOT $core_snap stable ;; esac