tools/build-docs-container: use CONTAINERCMD to append args
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
@@ -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]>
Hi Antonin,
Quoted 5 lines · Antonin Godard via lists.yoctoproject.org
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.Signed-off-by Antonin Godard <[email protected]>
Thanks!
Quentin