binman: bintool: run 'apt-get update -y' on first invocation of apt_install()
authorJerome Forissier <jerome.forissier@linaro.org>
Thu, 24 Jul 2025 09:12:41 +0000 (11:12 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 29 Jul 2025 23:00:07 +0000 (17:00 -0600)
commit252a2b2750e2df890e044d42e0a530a3e629c9b0
treec13125e6c81404810513bc0f9b3f57002562dba0
parent2babd34eacfb12f799f8d52a8729139041a18680
binman: bintool: run 'apt-get update -y' on first invocation of apt_install()

'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@linaro.org>
Reviewed-by: Bryan Brattlof <bb@ti.com>
tools/binman/bintool.py