Makefile: fix list-defconfigs for br2-external with weird descriptions

When a br2-external tree description contains an odd number of single
quotes, list-defconfigs will fail with a shell error message:

    /bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
    make[1]: *** [Makefile:1243: list-defconfigs] Error 2

Whoever wrote that code will have to write this sentence 100 times
on the blackboard:

     Never, ever pass user-provided data in a printf format.

(see commit 49117c1028 (core: support description for br2-external
trees); dang, I knew it... And I should have known better when I wrote
that code, damit...)

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Yann E. MORIN
2025-07-31 19:29:34 +02:00
committed by Julien Olivain
parent faa97af62a
commit 161d7ded43

View File

@@ -1223,7 +1223,7 @@ define list-defconfigs
[ -f "$${defconfig}" ] || continue; \
if $${first}; then \
if [ "$(2)" ]; then \
printf 'External configs in "$(call qstrip,$(2))":\n'; \
printf 'External configs in "%s":\n' "$(call qstrip,$(2))"; \
else \
printf "Built-in configs:\n"; \
fi; \