From 14066ce3895fe0fdb3768146b6ed2d5dca276e82 Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Thu, 9 Apr 2020 14:36:35 -0500 Subject: [PATCH] Fix logic to ensure snapd is seeded in core18-only images 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. --- live-build/functions | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/live-build/functions b/live-build/functions index 4daa6932..dd047c65 100644 --- a/live-build/functions +++ b/live-build/functions @@ -541,11 +541,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() {