Commit debbadcdf3 for qemu.org
commit debbadcdf3e3b3faccdf62ebb561d4ea2b4bb217
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Thu Sep 17 17:55:47 2026 +0100
configure: correctly honour --disable-containers
The configure script originally only probed for 'runc' command
in order to handle cross-compilation containers. The Makefile
under tests/docker would then probe again when used.
In order to eliminate the additional probeing, we changed
configure in commit c4ce04cfb7460d46c0262d437a7f35bb5c5fc449
to always probe for 'runc', so the result could be passed
along to tests/docker make rules.
That commit overlooked that the 'probe_target_compiler' func
was relying on '$runc' == 'no' as a proxy for the state of
the --disable-containers arg.
When we started unconditionally probing, that short cut no
longer works and we must explicitly check "$use_containers"
too.
Fixes: c4ce04cfb7460d46c0262d437a7f35bb5c5fc449
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20260917165602.3405537-4-alex.bennee@linaro.org>
diff --git a/configure b/configure
index 8f8fec4efc..04e312a111 100755
--- a/configure
+++ b/configure
@@ -1397,6 +1397,7 @@ probe_target_compiler() {
esac
for host in $container_hosts; do
+ test "$use_containers" = "yes" || continue
test "$container_command" != "" || continue
test "$host" = "$cpu" || continue
case $target_arch in