deb: set "--allow-downgrades" if a specific version is requested

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn committed 2026-07-13 14:18:40 +02:00
1 parent 02cb80d6c7
commit 0d6dc3deb8
1 file changed
+5 -1
+5 -1
View File
@@ -634,7 +634,11 @@ do_install() {
if ! is_dry_run; then
set -x
fi
$sh_c "DEBIAN_FRONTEND=noninteractive apt-get -y -qq install $pkgs >/dev/null"
apt_flags="-y -qq"
if [ -n "$pkg_version" ]; then
apt_flags="$apt_flags --allow-downgrades"
fi
$sh_c "DEBIAN_FRONTEND=noninteractive apt-get $apt_flags install $pkgs >/dev/null"
)
if [ "$NO_AUTOSTART" != "1" ]; then
start_docker_daemon