Skip to contentSkip to conversation

tools/build-docs-container: use CONTAINERCMD to append args

PATCH In review Antonin Godard 2 participants 2 messages Oct 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools/build-docs-container: use CONTAINERCMD to append args

What we have is OCI = $(which $CONTAINERCMD) = /usr/bin/{docker,podman}. So we never pass the current if conditions. Compare against the basename of OCI to pass the checks.

---
Changes in v2:
- Use basename on OCI instead of CONTAINERCMD, in case we use
docker-podman (thanks Quentin for pointing that out).
- Link to v1: https://lore.kernel.org/r/20251009-fix-build-docs-container-args-v1-1-169ce4248462@bootlin.com

---
 documentation/tools/build-docs-container | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
documentation/tools/build-docs-container +2 -2
index 70e05f295..791b36c3a 100755
@@ -157,11 +157,11 @@ main ()
     --security-opt label=disable
   )
 
-  if [ "$OCI" = "docker" ]; then
+  if [ "$(basename "$OCI")" = "docker" ]; then
     args_run+=(
       --user="$(id -u)":"$(id -g)"
     )
-  elif [ "$OCI" = "podman" ]; then
+  elif [ "$(basename "$OCI")" = "podman" ]; then
     # we need net access to fetch bitbake terms
     args_run+=(
       --cap-add=NET_RAW

---
base-commit: 09c7800333b17b21e50d2a089a3ae1b123697243
change-id: 20251009-fix-build-docs-container-args-d50c9ecbf7bf

Best regards,

Signature · 1 line
Antonin Godard <[email protected]>