[Merge] livecd-rootfs:uc18-kassel into livecd-rootfs:ubuntu/master
Steve Langasek
steve.langasek at canonical.com
Fri May 17 15:54:30 UTC 2019
Using a distinct model assertion would be a reasonable thing to do, but as this is not what the team who created this image actually *did*, and it would introduce different properties with respect to removability of the added default snaps (so would not be a no-op to ask them for a model assertion), I think that we should be continuing on with this in its current form rather than proposing changes this late in the delivery team's process.
Diff comments:
> diff --git a/live-build/auto/config b/live-build/auto/config
> index 46246eb..70b4a42 100755
> --- a/live-build/auto/config
> +++ b/live-build/auto/config
> @@ -355,12 +356,14 @@ case $IMAGEFORMAT in
>
> if [ $PROJECT = "ubuntu-core" ]; then
> # snap-based core images
> + EXTRA_SNAPS=""
>
> case $MODEL in
> pc-amd64|pc-i386)
> - UBUNTU_IMAGE_ARGS="--image-size 3700M" ;;
> - *)
> - UBUNTU_IMAGE_ARGS="" ;;
> + [ -z "${SUBARCH:-}" ] \
> + && UBUNTU_IMAGE_ARGS="--image-size 3700M"
> + ;;
> + *) ;;
Given the current status of not having a separate model, either we check the subarch in the model case statement, or we check the model in the subarch case statement, to make this robust. Neither direction seems better to me than the other necessarily.
> esac
> case $SUITE in
> xenial)
> @@ -371,6 +374,15 @@ case $IMAGEFORMAT in
> MODEL="ubuntu-core-18-${MODEL#pc-}" ;;
> esac
>
> + case "$ARCH+${SUBARCH:-}" in
The other switch statement is outside of the block where we check for PROJECT=ubuntu-core (ensuring that we are building a core, not classic, image for this target). If we were to build a classic image for this target, I think we would definitely want to not pass these same extra snaps. So I thought it better to avoid populating UBUNTU_IMAGE_ARGS when we weren't building an Ubuntu Core image.
> + amd64+kassel)
> + EXTRA_SNAPS="core bluez alsa-utils pulseaudio udisks2"
> + ;;
> + *) ;;
> + esac
> + for snap in $EXTRA_SNAPS; do
> + UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS --extra-snaps $snap"
> + done
> echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
> echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common
> # Store model assertion in top dir to get it picked up later as a build artifact
--
https://code.launchpad.net/~ubuntu-core-dev/livecd-rootfs/+git/livecd-rootfs/+merge/366327
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.
More information about the Ubuntu-reviews
mailing list