Merge bugfix/snapd_for_core18-eoan into ubuntu/eoan

Ensure snapd is seeded in core18-only images (and no implicit core snap)

The _snap_post_process function is meant to install snapd if core18 is the
only core snap installed or removed snapd if core is installed and snapd
was not explicitly installed. But the current logic in _snap_preseed
will never call _snap_post_process. $core_name will never be empty
with the existing logic, but even if it were that would only be for the
'core' snap and we'd miss using the 'core18' logic that pulls in snapd.
Given the case statement in _snap_post_process can handle doing the
right thing given any snap we can just call it unconditionally.

Seeing any snap via snap_preseed will evaluate the base for each snap
and seed the appropriate base. There should be no reason to explicitly
seed the 'core' snap and with snaps moving to 'core1

MP: https://code.launchpad.net/~rcj/livecd-rootfs/+git/livecd-rootfs/+merge/382312
ubuntu/eoan
Robert C Jennings 5 years ago
commit 863c3110c9
No known key found for this signature in database
GPG Key ID: 740C3D9EEDF2ED73

6
debian/changelog vendored

@ -1,3 +1,9 @@
livecd-rootfs (2.620.2) eoan; urgency=medium
* Fix logic to ensure snapd is seeded in core18-only images (LP: #1871919)
-- Robert C Jennings <robert.jennings@canonical.com> Wed, 15 Apr 2020 10:05:55 -0500
livecd-rootfs (2.620.1) eoan; urgency=medium
* Use snap cli rather than custom snap-tool (LP: #1864252)

@ -536,11 +536,7 @@ EOF
echo -n " file: " >> $seed_yaml
(cd $snaps_dir; ls -1 ${SNAP_NAME}_*.snap) >> $seed_yaml
# If $core_snap is the empty string then SNAP itself *may be* a core snap,
# and we run some post-processing logic.
if [ -z "$core_snap" ]; then
_snap_post_process $CHROOT_ROOT $SNAP_NAME
fi
_snap_post_process $CHROOT_ROOT $SNAP_NAME
}
snap_prepare_assertions() {
@ -619,12 +615,6 @@ snap_prepare() {
local CUSTOM_BRAND_MODEL=${2:-generic:generic-classic}
snap_prepare_assertions "$CHROOT_ROOT" "$CUSTOM_BRAND_MODEL"
# ubuntu-cpc:minimized has its own special snap handling
if [ "$PROJECT:${SUBPROJECT:-}" != ubuntu-cpc:minimized ]; then
# Download the core snap
_snap_preseed "$CHROOT_ROOT" core stable
fi
}
snap_preseed() {

Loading…
Cancel
Save