live-build/auto/config: Take into account SUBPROJECT when setting seeded

snaps, and also make sure we can work with snaps seeded in project hooks.
This commit is contained in:
Mathieu Trudel-Lapierre 2018-02-06 23:37:28 -05:00
parent 8366959fd6
commit 762536b5bf
2 changed files with 16 additions and 3 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
livecd-rootfs (2.499) UNRELEASED; urgency=medium
* live-build/auto/config: Take into account SUBPROJECT when setting seeded
snaps, and also make sure we can work with snaps seeded in project hooks.
-- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Tue, 06 Feb 2018 22:47:05 -0500
livecd-rootfs (2.498) bionic; urgency=medium
* Don't write config/seeded-snaps if no snaps have been seeded.

View File

@ -655,10 +655,16 @@ esac
# we'll expand the base seed given here according to the STRUCTURE file, and
# then look in all of the seeds found to see which snaps are seeded
case $PROJECT in
ubuntu|kubuntu*|lubuntu*|xubuntu*|ubuntu-mate*|ubuntustudio*|ubuntukylin*|ubuntu-budgie*)
case $PROJECT:${SUBPROJECT:-} in
ubuntu:*|kubuntu*:*|lubuntu*:*|xubuntu*:*|ubuntu-mate*:*|ubuntustudio*:*|ubuntukylin*:*|ubuntu-budgie*:*)
BASE_SEED='desktop'
;;
ubuntu-server:live)
BASE_SEED='server'
# subiquity is seeded but in a separate squashfs via hooks; set HOOK_SNAPS and ALL_SNAPS.
HOOK_SNAPS='subiquity'
ALL_SNAPS=''
;;
esac
if [ -n "${BASE_SEED}" ]; then
@ -676,7 +682,7 @@ if [ -n "${BASE_SEED}" ]; then
ALL_SNAPS="${ALL_SNAPS:+${ALL_SNAPS} }${snap}"
done
done
if [ -n "${ALL_SNAPS}" ]; then
if [ -n "${ALL_SNAPS}" ] || [ -n "${HOOK_SNAPS}" ]; then
echo "${ALL_SNAPS}" > config/seeded-snaps
fi
fi