snap: move the seeding block down, so that it is common to all flavours

ubuntu/cosmic
Iain Lane 7 years ago
parent 07873ec528
commit 26612d0b26

@ -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

Loading…
Cancel
Save