This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=ff5e9ac554c8d80aeae7d0bb3cf39f66528dfa0d commit ff5e9ac554c8d80aeae7d0bb3cf39f66528dfa0d Author: Guillem Jover <[email protected]> AuthorDate: Thu May 22 10:43:16 2025 +0200 test: Use $() instead of legacy `` for shell command expansion Warned-by: shellcheck --- tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postinst | 2 +- tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postrm | 2 +- tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/preinst | 2 +- tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/prerm | 2 +- tests/t-triggers-cycle/pkg-trigger-a/DEBIAN/postinst | 2 +- tests/t-triggers-cycle/pkg-trigger-b/DEBIAN/postinst | 2 +- tests/t-triggers-depcycle/pkg-trigger/DEBIAN/postinst | 4 ++-- tests/t-triggers-depends/pkg-interest/DEBIAN/postinst | 2 +- tests/t-triggers-depfarcycle/pkg-trigger/DEBIAN/postinst | 2 +- tests/t-triggers-halt/pkg-trigger/DEBIAN/postinst | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postinst b/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postinst index da151be2f..2508454c2 100755 --- a/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postinst +++ b/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postinst @@ -12,5 +12,5 @@ done if [ -n "$fddir" ]; then ls -l "$fddir" # We should have the 3 standard descriptors, plus 1 for the open directory. - [ `ls "$fddir" | wc -l` -eq 4 ] || echo WARN: maintscript leaks fd + [ $(ls "$fddir" | wc -l) -eq 4 ] || echo WARN: maintscript leaks fd fi diff --git a/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postrm b/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postrm index da151be2f..2508454c2 100755 --- a/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postrm +++ b/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/postrm @@ -12,5 +12,5 @@ done if [ -n "$fddir" ]; then ls -l "$fddir" # We should have the 3 standard descriptors, plus 1 for the open directory. - [ `ls "$fddir" | wc -l` -eq 4 ] || echo WARN: maintscript leaks fd + [ $(ls "$fddir" | wc -l) -eq 4 ] || echo WARN: maintscript leaks fd fi diff --git a/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/preinst b/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/preinst index da151be2f..2508454c2 100755 --- a/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/preinst +++ b/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/preinst @@ -12,5 +12,5 @@ done if [ -n "$fddir" ]; then ls -l "$fddir" # We should have the 3 standard descriptors, plus 1 for the open directory. - [ `ls "$fddir" | wc -l` -eq 4 ] || echo WARN: maintscript leaks fd + [ $(ls "$fddir" | wc -l) -eq 4 ] || echo WARN: maintscript leaks fd fi diff --git a/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/prerm b/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/prerm index da151be2f..2508454c2 100755 --- a/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/prerm +++ b/tests/t-maintscript-leak/pkg-maintscript-leak/DEBIAN/prerm @@ -12,5 +12,5 @@ done if [ -n "$fddir" ]; then ls -l "$fddir" # We should have the 3 standard descriptors, plus 1 for the open directory. - [ `ls "$fddir" | wc -l` -eq 4 ] || echo WARN: maintscript leaks fd + [ $(ls "$fddir" | wc -l) -eq 4 ] || echo WARN: maintscript leaks fd fi diff --git a/tests/t-triggers-cycle/pkg-trigger-a/DEBIAN/postinst b/tests/t-triggers-cycle/pkg-trigger-a/DEBIAN/postinst index a874abfd9..6ea04320d 100755 --- a/tests/t-triggers-cycle/pkg-trigger-a/DEBIAN/postinst +++ b/tests/t-triggers-cycle/pkg-trigger-a/DEBIAN/postinst @@ -6,7 +6,7 @@ case "$1" in dpkg-trigger /test/trigger-b/test-file ;; triggered) - pkg_status=`dpkg-query -f '${Status}' -W pkg-depends` + pkg_status=$(dpkg-query -f '${Status}' -W pkg-depends) if [ "$pkg_status" = "install ok installed" ]; then echo "Pass: pkg-depends is installed" else diff --git a/tests/t-triggers-cycle/pkg-trigger-b/DEBIAN/postinst b/tests/t-triggers-cycle/pkg-trigger-b/DEBIAN/postinst index 8f1c02fce..3d2527997 100755 --- a/tests/t-triggers-cycle/pkg-trigger-b/DEBIAN/postinst +++ b/tests/t-triggers-cycle/pkg-trigger-b/DEBIAN/postinst @@ -6,7 +6,7 @@ case "$1" in dpkg-trigger /test/trigger-a/test-file ;; triggered) - pkg_status=`dpkg-query -f '${Status}' -W pkg-depends` + pkg_status=$(dpkg-query -f '${Status}' -W pkg-depends) if [ "$pkg_status" = "install ok installed" ]; then echo "Pass: pkg-depends is installed" else diff --git a/tests/t-triggers-depcycle/pkg-trigger/DEBIAN/postinst b/tests/t-triggers-depcycle/pkg-trigger/DEBIAN/postinst index 716cdd508..7e57aaa5b 100755 --- a/tests/t-triggers-depcycle/pkg-trigger/DEBIAN/postinst +++ b/tests/t-triggers-depcycle/pkg-trigger/DEBIAN/postinst @@ -3,14 +3,14 @@ set -e case "$1" in triggered) - pkg_status=`dpkg-query -f '${Status}' -W pkg-depends` + pkg_status=$(dpkg-query -f '${Status}' -W pkg-depends) if [ "$pkg_status" = "install ok installed" ]; then echo "Pass: pkg-depends is installed" else echo "Fail: pkg-depends is not installed ($pkg_status)" exit 1 fi - pkg_status=`dpkg-query -f '${Status}' -W pkg-files` + pkg_status=$(dpkg-query -f '${Status}' -W pkg-files) if [ "$pkg_status" = "install ok installed" ]; then echo "Pass: pkg-files is installed" else diff --git a/tests/t-triggers-depends/pkg-interest/DEBIAN/postinst b/tests/t-triggers-depends/pkg-interest/DEBIAN/postinst index 9f7672617..3b1bedbab 100755 --- a/tests/t-triggers-depends/pkg-interest/DEBIAN/postinst +++ b/tests/t-triggers-depends/pkg-interest/DEBIAN/postinst @@ -3,7 +3,7 @@ set -e case "$1" in triggered) - pkg_status=`dpkg-query -f '${Status}' -W pkg-depended` + pkg_status=$(dpkg-query -f '${Status}' -W pkg-depended) if [ "$pkg_status" = "install ok installed" ]; then echo "Pass: pkg-depended is installed" else diff --git a/tests/t-triggers-depfarcycle/pkg-trigger/DEBIAN/postinst b/tests/t-triggers-depfarcycle/pkg-trigger/DEBIAN/postinst index ffbad7827..e32ee79b1 100755 --- a/tests/t-triggers-depfarcycle/pkg-trigger/DEBIAN/postinst +++ b/tests/t-triggers-depfarcycle/pkg-trigger/DEBIAN/postinst @@ -3,7 +3,7 @@ set -e case "$1" in triggered) - pkg_status=`dpkg-query -f '${Status}' -W pkg-depends-a` + pkg_status=$(dpkg-query -f '${Status}' -W pkg-depends-a) if [ "$pkg_status" = "install ok installed" ]; then echo "Pass: pkg-depends is installed" else diff --git a/tests/t-triggers-halt/pkg-trigger/DEBIAN/postinst b/tests/t-triggers-halt/pkg-trigger/DEBIAN/postinst index 72b74a115..aed86cb30 100755 --- a/tests/t-triggers-halt/pkg-trigger/DEBIAN/postinst +++ b/tests/t-triggers-halt/pkg-trigger/DEBIAN/postinst @@ -3,14 +3,14 @@ set -e case "$1" in triggered) - pkg_status=`dpkg-query -f '${Status}' -W pkg-depends` + pkg_status=$(dpkg-query -f '${Status}' -W pkg-depends) if [ "$pkg_status" = "install ok installed" ]; then echo "Pass: pkg-depends is installed" else echo "Fail: pkg-depends is not installed ($pkg_status)" exit 1 fi - pkg_status=`dpkg-query -f '${Status}' -W pkg-nonexistent` + pkg_status=$(dpkg-query -f '${Status}' -W pkg-nonexistent) if [ "$pkg_status" = "install ok installed" ]; then echo "Pass: pkg-nonexistent is installed" else -- Dpkg.Org's dpkg

