From 26612d0b266a20efa99abbe0dca5377fd7684d3b Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 30 Jan 2018 09:44:25 +0000 Subject: [PATCH] snap: move the seeding block down, so that it is common to all flavours --- live-build/auto/config | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index f6ceea42..053e31fd 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -306,24 +306,9 @@ case $PROJECT in add_task install minimal standard ubuntu-desktop LIVE_TASK='ubuntu-live' BASE_SEED='desktop' - SEEDS_EXPANDED=$(inheritance ${BASE_SEED}) case $ARCH in amd64) add_package live $SIGNED_KERNEL_PACKAGE ;; esac - for seed in ${SEEDS_EXPANDED}; do - echo "snap: considering ${seed}" - file=config/germinate-output/${seed}.snaps - [ -e "${file}" ] || continue - # extract the first column (snap package name) from germinate's output - # translate the human-readable "foo (classic)" into a - # more machine readable "foo/classic" - seed_snaps=$(sed -rn '1,/-----/d;/-----/,$d; s/(.*) \|.*/\1/; s, \(classic\),/classic,; p' "${file}") - for snap in ${seed_snaps}; do - echo "snap: found ${snap}" - ALL_SNAPS="${ALL_SNAPS:+${ALL_SNAPS} }${snap}" - done - done - echo "${ALL_SNAPS}" > config/seeded-snaps ;; ubuntu-desktop-next) @@ -654,6 +639,24 @@ case $PROJECT in ;; esac +if [ -n "${BASE_SEED}" ]; then + SEEDS_EXPANDED=$(inheritance ${BASE_SEED}) + for seed in ${SEEDS_EXPANDED}; do + echo "snap: considering ${seed}" + file=config/germinate-output/${seed}.snaps + [ -e "${file}" ] || continue + # extract the first column (snap package name) from germinate's output + # translate the human-readable "foo (classic)" into a + # more machine readable "foo/classic" + seed_snaps=$(sed -rn '1,/-----/d;/-----/,$d; s/(.*) \|.*/\1/; s, \(classic\),/classic,; p' "${file}") + for snap in ${seed_snaps}; do + echo "snap: found ${snap}" + ALL_SNAPS="${ALL_SNAPS:+${ALL_SNAPS} }${snap}" + done + done + echo "${ALL_SNAPS}" > config/seeded-snaps +fi + export APT_OPTIONS if [ "$PREINSTALLED" != "true" ] && [ "$LIVE_TASK" ]; then