live-build: move snap seed validation into snap_preseed

u-i-cloud-init
Michael Vogt 6 years ago
parent ac717bff40
commit 248efab2fd

@ -88,11 +88,6 @@ preinstall_snaps() {
snap_preseed chroot "${snap}"
done
lb chroot_resolv remove
# Do basic validation of generated snapd seed.yaml.
if [ -e chroot/var/lib/snapd/seed/seed.yaml ]; then
snap debug validate-seed chroot/var/lib/snapd/seed/seed.yaml
fi
}
rm -f binary.success

@ -635,6 +635,15 @@ snap_preseed() {
touch "$CHROOT_ROOT/var/lib/snapd/seed/.snapd-explicit-install-stamp"
;;
esac
# Do basic validation of generated snapd seed.yaml, doing it here
# means we catch all the places(tm) that snaps are added but the
# downside is that each time a snap is added the seed must be valid,
# i.e. snaps with bases need to add bases first etc.
if [ -e chroot/var/lib/snapd/seed/seed.yaml ]; then
snap debug validate-seed chroot/var/lib/snapd/seed/seed.yaml
fi
}
snap_from_seed() {
@ -892,4 +901,4 @@ replace_kernel () {
install --assume-yes "${new_kernel}"
env DEBIAN_FRONTEND=noninteractive chroot "${mountpoint}" apt-get \
autoremove --purge --assume-yes
}
}

Loading…
Cancel
Save