[Merge] lp:~rcj/livecd-rootfs/trunk into lp:livecd-rootfs

Robert C Jennings robert.jennings at canonical.com
Thu Sep 27 17:57:41 UTC 2018


Francis, updated.

Diff comments:

> 
> === modified file 'live-build/functions'
> --- live-build/functions	2018-05-28 14:39:06 +0000
> +++ live-build/functions	2018-09-27 16:43:32 +0000
> @@ -427,6 +427,22 @@
>      local brand="$(echo $CUSTOM_BRAND_MODEL | cut -d: -f 1)"
>      local model="$(echo $CUSTOM_BRAND_MODEL | cut -d: -f 2)"
>  
> +    # Clear the assertions if a hook wants to prepare a new
> +    # assertion that isn't the default generic:generic-classic
> +    if [ -e "$model_assertion" ] ; then

Fixed Francis' issue with a message logged when we decide not to replace an existing assertion.

> +        existing_model=$(sed -n 's/^model: \(.*\)$/\1/p' $model_assertion)
> +        existing_brand=$(sed -n 's/^brand-id: \(.*\)$/\1/p' $model_assertion)
> +        if [ "$existing_model" == "generic-classic" ] &&
> +           [ "$existing_brand" == "generic" ] &&
> +           ( [ "$existing_model" != "$model" ] ||
> +             [ "$existing_brand" != "$brand" ] ); then
> +            echo "snap_prepare_assertions: clearing $existing_brand:$existing_model for $brand:$model"
> +            rm "$model_assertion"
> +            rm "$account_key_assertion"
> +            rm "$account_assertion"
> +       fi
> +    fi
> +
>      if ! [ -e "$model_assertion" ] ; then
>          snap known --remote model series=16 \
>              model=$model brand-id=$brand \


-- 
https://code.launchpad.net/~rcj/livecd-rootfs/trunk/+merge/355791
Your team Ubuntu Core Development Team is requested to review the proposed merge of lp:~rcj/livecd-rootfs/trunk into lp:livecd-rootfs.



More information about the Ubuntu-reviews mailing list