Pare down 'BASE_SEED' handling to only those flavors which still use it.

Per the comments, BASE_SEED was initially used to identify the seed in the
flavor to use for identifying preseeded snaps, and later was also used to
identify which "minimal-remove" seed to apply to an image.

The first usage is now obsolete after a refactor; we now correctly detect
snaps from any of the included seeds without needing an explicit
declaration.

The second usage only applies to installer images that are NOT using layered
squashfs, since for these images 'minimal' is a separate squashfs layer
rather than a list of packages to remove after the fact.

Refactor this code to eliminate pointless definitions of BASE_SEED and
define it only for the subset of flavors today that:
 - have a 'minimal-remove' seed
 - are not using layered squashfs.
This commit is contained in:
Steve Langasek 2024-02-18 10:28:38 -08:00
parent f64c281a3f
commit bf5a799935
2 changed files with 10 additions and 23 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
livecd-rootfs (24.04.39) UNRELEASED; urgency=medium
* Pare down 'BASE_SEED' handling to only those flavors which still use it.
-- Steve Langasek <steve.langasek@ubuntu.com> Sun, 18 Feb 2024 10:27:50 -0800
livecd-rootfs (24.04.38) noble; urgency=medium
* Fix overlooked syntax error

View File

@ -1209,29 +1209,10 @@ case $SUBPROJECT in
;;
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:${SUBPROJECT:-} in
ubuntu-wsl:*)
BASE_SEED='wsl'
;;
ubuntu-cpc:*)
# we don't preseed any snaps in minimized images, so no need to set
# BASE_SEED in that case.
if [ "${SUBPROJECT:-}" != minimized ]; then
BASE_SEED='server'
fi
;;
ubuntu-server:live)
BASE_SEED='server'
;;
ubuntu-base:*|ubuntu-core:*|ubuntu-mini-iso:|ubuntu-oci:*|\
xubuntu:minimal)
;;
edubuntu:*)
BASE_SEED='desktop-gnome'
;;
*)
case $PROJECT in
kubuntu|ubuntu-mate|ubuntu-unity|ubuntukylin)
# only used now for the 'minimal-remove' functionality,
# which is not used at all in layered images
BASE_SEED='desktop'
;;
esac