← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~jugmac00/lpcraft:add-support-for-trusted-value into lpcraft:main

 


Diff comments:

> diff --git a/NEWS.rst b/NEWS.rst
> index da3bbc7..5fd2e10 100644
> --- a/NEWS.rst
> +++ b/NEWS.rst
> @@ -5,7 +5,10 @@ Version history
>  0.0.19 (unreleased)
>  ===================
>  
> -- nothing yet
> +- Add new CLI option to provide secrets via a YAML-based configuration file.

this one slipped into the news for 0.0.18, but has not yet been officially released

> +
> +- Allow overriding APT's security checks via `PackageRepository.trusted`
> +
>  
>  0.0.18 (2022-07-04)
>  ===================
> diff --git a/lpcraft/config.py b/lpcraft/config.py
> index 0e835e2..e9ef69a 100644
> --- a/lpcraft/config.py
> +++ b/lpcraft/config.py
> @@ -131,7 +143,10 @@ class PackageRepository(ModelConfigDefaults):
>          """  # noqa: E501
>          for format in self.formats:
>              for suite in self.suites:
> -                yield f"{format} {self.url!s} {suite} {' '.join(self.components)}"  # noqa: E501
> +                if self.trusted:
> +                    yield f"{format} [trusted={self.trusted}] {self.url!s} {suite} {' '.join(self.components)}"  # noqa: E501
> +                else:
> +                    yield f"{format} {self.url!s} {suite} {' '.join(self.components)}"  # noqa: E501

That's not very elegant, but I think ok for now - if that gets more complicated, we can switch back to building the string, part for part.

>  
>  
>  class Job(ModelConfigDefaults):


-- 
https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/426416
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/lpcraft:add-support-for-trusted-value into lpcraft:main.



References