binman: bintool: use apt-get instead of apt

The 'apt' command is not meant to be used in scripts or tools. Please
see the man page [1] for details. Therefore, use 'apt-get' instead.
This avoids the following warning:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

[1] https://manpages.debian.org/bookworm/apt/apt.8.en.html#SCRIPT_USAGE_AND_DIFFERENCES_FROM_OTHER_APT_TOOLS

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bryan Brattlof <bb@ti.com>
This commit is contained in:
Jerome Forissier
2025-07-29 17:00:07 -06:00
committed by Tom Rini
parent 3532f1f5ed
commit 2babd34eac
+1 -1
View File
@@ -421,7 +421,7 @@ class Bintool:
Returns:
True, assuming it completes without error
"""
args = ['sudo', 'apt', 'install', '-y', package]
args = ['sudo', 'apt-get', 'install', '-y', package]
print('- %s' % ' '.join(args))
tools.run(*args)
return True