Skip to contentSkip to conversation

configure: correctly honour --disable-containers

PATCH In review Daniel P. Berrangé 2 participants 2 messages Sep 1

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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
---
 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index 56158cd95f..5e282f1c4d 100755
@@ -1415,6 +1415,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
Signature · 1 line
2.55.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 13 lines · Daniel P. Berrangé

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.

Quoted 7 lines

When we started unconditionally probing, that short cut no longer works and we must explicitly check "$use_containers" too.

Fixes c4ce04cfb7460d46c0262d437a7f35bb5c5fc449
Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro