[Merge] ~tchavadar/livecd-rootfs:install-image-definitions-deb-option into livecd-rootfs:ubuntu/master

Hector CAO mp+464755 at code.launchpad.net
Tue Apr 23 15:19:01 UTC 2024


LGTM except a minor comment

Diff comments:

> diff --git a/live-build/auto/config b/live-build/auto/config
> index a229f39..9e8df78 100755
> --- a/live-build/auto/config
> +++ b/live-build/auto/config
> @@ -533,10 +533,19 @@ case $IMAGEFORMAT in
>  			IMAGE_PROJECT=$PROJECT
>  			[ "$IMAGE_PROJECT" = "ubuntu-cpc" ] && IMAGE_PROJECT="ubuntu-server"
>  
> -			LB_UBUNTU_IMAGES_REPO="${LB_UBUNTU_IMAGES_REPO:-git://git.launchpad.net/ubuntu-images}"
> -			LB_UBUNTU_IMAGES_BRANCH="${LB_UBUNTU_IMAGES_BRANCH:-$SUITE}"
> -			git clone "$LB_UBUNTU_IMAGES_REPO" -b "$LB_UBUNTU_IMAGES_BRANCH" image-definitions
> -			IMAGE_DEFINITION="image-definitions/$IMAGE_PROJECT-$MODEL.yaml"
> +			if [ -z "${LB_USE_UBUNTU_IMAGES_DEB:-}" ]; then
> +				LB_UBUNTU_IMAGES_ROOT=${LB_UBUNTU_IMAGES_ROOT:-image-definitions}
> +				LB_UBUNTU_IMAGES_REPO="${LB_UBUNTU_IMAGES_REPO:-git://git.launchpad.net/ubuntu-images}"
> +				LB_UBUNTU_IMAGES_BRANCH="${LB_UBUNTU_IMAGES_BRANCH:-$SUITE}"
> +				git clone "$LB_UBUNTU_IMAGES_REPO" -b "$LB_UBUNTU_IMAGES_BRANCH" $LB_UBUNTU_IMAGES_ROOT
> +			else
> +				LB_UBUNTU_IMAGES_ROOT=${LB_UBUNTU_IMAGES_ROOT:-/usr/share/ubuntu-images}

I think that we would want to erase the LB_UBUNTU_IMAGES_ROOT in this case ?? right ? for git, it makes sense to let the user choose the destination folder that will be passed to "git clone" but if we install the package, we cannot have this luxury

> +				echo "Using $LB_USE_UBUNTU_IMAGES_DEB package instead of git repo.."
> +				sudo apt install $LB_USE_UBUNTU_IMAGES_DEB -y
> +			fi
> +
> +			IMAGE_DEFINITION="$LB_UBUNTU_IMAGES_ROOT/$IMAGE_PROJECT-$MODEL.yaml"
> +			echo "LB_UBUNTU_IMAGES_ROOT=$LB_UBUNTU_IMAGES_ROOT" >> config/common
>  			echo "IMAGE_DEFINITION=$IMAGE_DEFINITION" >> config/common
>  			echo "Configured ubuntu-image to use image definition file $IMAGE_DEFINITION which has the following contents:"
>  			cat "$IMAGE_DEFINITION"


-- 
https://code.launchpad.net/~tchavadar/livecd-rootfs/+git/livecd-rootfs/+merge/464755
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.




More information about the Ubuntu-reviews mailing list