← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~raharper/curtin:feature/curtainer-support-minimal-images into curtin:master

 

Thanks

Diff comments:

> diff --git a/tools/curtainer b/tools/curtainer
> index a6fdc1b..dec7500 100755
> --- a/tools/curtainer
> +++ b/tools/curtainer
> @@ -187,9 +188,24 @@ main() {
>      if $daily; then
>          local daily_ppa="ppa:curtin-dev/daily"
>          debug 1 "enabling daily: $daily_ppa"
> -        inside "$name" add-apt-repository --enable-source --yes \
> -            "${daily_ppa}" ||
> -            fail "failed add-apt-repository for daily."
> +        local addaptrepo="add-apt-repository"
> +        inside "$name" which $addaptrepo >/dev/null || addaptrepo=""
> +        if [ -n "${addaptrepo}" ]; then
> +            inside "$name" ${addaptrepo} --enable-source --yes \
> +                "${daily_ppa}" ||
> +                fail "failed add-apt-repository for daily."
> +        else
> +            # https://launchpad.net/~curtin-dev/+archive/ubuntu/daily
> +            local url=http://ppa.launchpad.net/curtin-dev/daily/ubuntu
> +            local keyserver="keyserver.ubuntu.com"
> +            local key=55FE7C8C0165013E
> +            local fname=/etc/apt/sources.list.d/curtin-daily-ppa.list
> +            inside "$name" sh -c "
> +                echo deb $url $release main > $fname &&
> +                gpg --keyserver $keyserver --recv $key &&
> +                gpg --export --armour $key | apt-key add -" ||
> +                fail "failed to add $daily_ppa repository manually"

I'll fix the deb source line; that is needed

>  - run `apt-get update` after the fact, as add-apt-repository
>    does it by default.

In the context of curtainer; we immediate run apt update as well;  So while you're right; I'd rather not run update twice.


> Also TIL that apt-key is mostly deprecated and according to its manpage it will last be available in Debian 11 and Ubuntu 22.04. I think the gpg and apt-key lines can be replace with:

Would you file a bug against cloud-init/curtin each on fixing apt-key usage;

> +        fi
>      fi
>  
>      line="Acquire::Languages \"none\";"


-- 
https://code.launchpad.net/~raharper/curtin/+git/curtin/+merge/389431
Your team curtin developers is subscribed to branch curtin:master.


References