jw.pkg.cmds.projects.CmdRequiredOsPkg: Support --quote

--quote puts double quotation marks around the listed dependencies,
protecting version requirements (>= 1.0) and parenthesis "perl(GD)"
from the shell.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-01-29 10:43:14 +01:00
commit 2bbf5bd8e7
3 changed files with 12 additions and 8 deletions

View file

@ -190,7 +190,7 @@ prefix.done:
touch $@
echo-build-deps:
$(Q)echo $(call proj_query, required-os-pkg --flavours "build" $(PROJECT))
$(Q)echo $(call proj_query, required-os-pkg --quote --flavours "build" $(PROJECT))
git-ssh-%:
bash -c "`git remote get-url --push $* | sed 's|ssh://||; s|\([^/]\+\)/\(.*\)|LC_CDPATH=/\2 ssh -o SendEnv=LC_CDPATH \1|'`"
@ -213,10 +213,10 @@ pkg-manager-refresh:
$(PKG_MANAGER) refresh
pkg-install-build-deps:
$(PKG_MANAGER) install $(BASE_PKGS) $(shell $(proj_query_cmd) required-os-pkg --skip-excluded --flavours "build" $(PROJECT))
$(PKG_MANAGER) install $(BASE_PKGS) $(shell $(proj_query_cmd) required-os-pkg --quote --skip-excluded --flavours "build" $(PROJECT))
pkg-install-release-deps:
$(PKG_MANAGER) install $(BASE_PKGS) $(shell $(proj_query_cmd) required-os-pkg --skip-excluded --flavours "build run release" $(PROJECT))
$(PKG_MANAGER) install $(BASE_PKGS) $(shell $(proj_query_cmd) required-os-pkg --quote --skip-excluded --flavours "build run release" $(PROJECT))
pkg-install-testbuild-deps:
$(PKG_MANAGER) install $(BASE_PKGS) $(shell $(proj_query_cmd) pkg-requires --delimiter=' ' --no-version build,run,release $(PROJECT))