[PATCH v2 2/2] binman: bintool: run 'apt-get update -y' on first invocation of apt_install()
Quentin Schulz
quentin.schulz at cherry.de
Thu Jul 24 11:06:52 CEST 2025
Hi Jerome,
On 7/24/25 11:02 AM, Jerome Forissier wrote:
> 'apt-get update -y' may be required to make sure that the list of
> packages is up-to-date and that the subsequent 'apt-get install'
> operations can find the requested packages.
>
> Fixes the following CI error:
>
> Fetch: zstd
> - trying method: binary download
> - sudo apt-get install -y zstd
> Exception: Error 100 running 'sudo apt-get install -y zstd': E: Unable to locate package zstd
>
> Signed-off-by: Jerome Forissier <jerome.forissier at linaro.org>
> ---
>
> Changes in v2:
> - Use apt-get instead of apt
>
> tools/binman/bintool.py | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tools/binman/bintool.py b/tools/binman/bintool.py
> index f46bb52a7b3..141cc66657c 100644
> --- a/tools/binman/bintool.py
> +++ b/tools/binman/bintool.py
> @@ -55,6 +55,9 @@ class Bintool:
> # must be called before this class is used.
> tooldir = ''
>
> + # Flag to run 'apt update' once on first use of apt_install()
> + apt_updated = False
> +
> def __init__(self, name, desc, version_regex=None, version_args='-V'):
> self.name = name
> self.desc = desc
> @@ -421,6 +424,11 @@ class Bintool:
> Returns:
> True, assuming it completes without error
> """
> + if not cls.apt_updated:
> + args = ['sudo', 'apt', 'update', '-y']
I think you forgot to do git add (or git commit --amend) before sending
the v2 :)
Cheers,
Quentin
More information about the U-Boot
mailing list