[Merge] ~ethan.hsieh/livecd-rootfs/+git/livecd-rootfs:ubuntu/master into livecd-rootfs:ubuntu/master

ethan.hsieh ethan.hsieh at canonical.com
Tue Jul 13 07:00:39 UTC 2021



Diff comments:

> diff --git a/live-build/functions b/live-build/functions
> index d1be603..99e3bd5 100644
> --- a/live-build/functions
> +++ b/live-build/functions
> @@ -548,7 +548,7 @@ _snap_preseed() {
>      sh -c "
>          set -x;
>          cd \"$CHROOT_ROOT/var/lib/snapd/seed\";
> -        SNAPPY_STORE_NO_CDN=1 snap download \
> +        UBUNTU_STORE_ARCH=$ARCH SNAPPY_STORE_NO_CDN=1 snap download \

It's from the caller of _snap_preseed().
live-build/auto/build or live-build/ubuntu-server/hooks/032-installer-squashfs.binary

1. auto/build:
I saw some places use $ARCH directly, so I thought it's always set.
2. 032-installer-squashfs.binary:
I missed this one. Will dig deeper to figure out.

The default value of "arch" in [1] is UBUNTU_STORE_ARCH.
When UBUNTU_STORE_ARCH is not set, "arch" is NULL.
It seems to me that "UBUNTU_STORE_ARCH=$ARCH" can be replaced with "UBUNTU_STORE_ARCH=${ARCH:-$UBUNTU_STORE_ARCH}"
When $ARCH is not set, it will be set to UBUNTU_STORE_ARCH.

---
[1] https://github.com/snapcore/snapd/blob/master/image/helpers.go#L207

>              --cohort="${COHORT_KEY:-}" \
>              --channel=\"$CHANNEL\" \"$SNAP_NAME\"" || snap_download_failed=1
>      if [ $snap_download_failed = 1 ] ; then


-- 
https://code.launchpad.net/~ethan.hsieh/livecd-rootfs/+git/livecd-rootfs/+merge/405367
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~ethan.hsieh/livecd-rootfs/+git/livecd-rootfs:ubuntu/master into livecd-rootfs:ubuntu/master.



More information about the Ubuntu-reviews mailing list