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}" snap_preseed chroot "${snap}"
done done
lb chroot_resolv remove 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 rm -f binary.success

@ -635,6 +635,15 @@ snap_preseed() {
touch "$CHROOT_ROOT/var/lib/snapd/seed/.snapd-explicit-install-stamp" touch "$CHROOT_ROOT/var/lib/snapd/seed/.snapd-explicit-install-stamp"
;; ;;
esac 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() { snap_from_seed() {

Loading…
Cancel
Save