From d8418ce63de206967bea5918615ee4471183cd06 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Mar 29 2023 19:13:00 +0000 Subject: fastlint: Correct concatenation of file lists `printf` ignores excessive arguments unused in formatting. This resulted in only the first file from two file lists was linted/ stylechecked if both Python template files and Python modules were changed. Make use of formatting instead: > The format is reused as necessary to consume all of the arguments Fixes: https://pagure.io/freeipa/issue/9318 Signed-off-by: Stanislav Levin Reviewed-By: Rob Crittenden Reviewed-By: Florence Blanc-Renaud --- diff --git a/Makefile.am b/Makefile.am index 20b338c..e0cd8f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -244,7 +244,7 @@ fastcodestyle: $(GENERATED_PYTHON_FILES) ipasetup.py | xargs -n1 file 2>/dev/null | grep Python \ | cut -d':' -f1; ); \ if [ -n "$${PYFILES}" ] && [ -n "$${INFILES}" ]; then \ - FILES="$$( printf $${PYFILES}\\n$${INFILES} )" ; \ + FILES="$$( printf '%s\n' "$${PYFILES}" "$${INFILES}" )" ; \ elif [ -n "$${PYFILES}" ]; then \ FILES="$${PYFILES}" ; \ else \ @@ -274,7 +274,7 @@ endif | xargs -n1 file 2>/dev/null | grep Python \ | cut -d':' -f1; ); \ if [ -n "$${PYFILES}" ] && [ -n "$${INFILES}" ]; then \ - FILES="$$( printf $${PYFILES}\\n$${INFILES} )" ; \ + FILES="$$( printf '%s\n' "$${PYFILES}" "$${INFILES}" )" ; \ elif [ -n "$${PYFILES}" ]; then \ FILES="$${PYFILES}" ; \ else \