diff --git a/live-build/auto/build b/live-build/auto/build index 4b827f9d..74630174 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -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 diff --git a/live-build/functions b/live-build/functions index 8eff0a90..a07fff55 100644 --- a/live-build/functions +++ b/live-build/functions @@ -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 -} \ No newline at end of file +}