diff --git a/debian/changelog b/debian/changelog index 78ce248b..1828c0f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.671) groovy; urgency=medium + + * Fix-up seeding snaps with tracks. + + -- Dimitri John Ledkov Fri, 10 Jul 2020 01:55:47 +0100 + livecd-rootfs (2.670) groovy; urgency=medium * snap_preseed: support channel specification with snap name (LP: #1882374) diff --git a/live-build/functions b/live-build/functions index 2f847859..5faf6093 100644 --- a/live-build/functions +++ b/live-build/functions @@ -634,9 +634,9 @@ snap_preseed() { # $2 can be in the form of snap_name/classic=track/risk/branch local SNAP=$2 # strip CHANNEL specification - local SNAP_NAME=${SNAP%=*} + SNAP=${SNAP%=*} # strip /classic confinement - SNAP_NAME=${SNAP_NAME%/*} + local SNAP_NAME=${SNAP%/*} # Seed from the specified channel (e.g. core18 latest/stable) # Or Channel endcoded in the snap name (e.g. lxd=4.0/stable/ubuntu-20.04) # Or Ubuntu policy default channel latest/stable/ubuntu-$(release_ver) @@ -652,6 +652,11 @@ snap_preseed() { esac fi + # At this point: + # SNAP_NAME is just the snap name + # SNAP is either $SNAP_NAME or $SNAP_NAME/classic for classic confined + # CHANNEL is the channel + if [ ! -e "$CHROOT_ROOT/var/lib/snapd/seed/assertions/model" ]; then echo "ERROR: Snap model assertion not present, snap_prepare must be called" exit 1