This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=e423c09d97a638d9bfb4cee1446bbc9f92e1cce7 commit e423c09d97a638d9bfb4cee1446bbc9f92e1cce7 Author: Guillem Jover <[email protected]> AuthorDate: Mon Jan 4 02:33:18 2021 +0100 Quote DPKG_ROOT and DPKG_INSTDIR usage We should make sure these are quoted in case of spaces in pathnames. --- t-conffile-obsolete/Makefile | 2 +- t-conffile-prompt/pkg-conff-prompt-0/DEBIAN/postinst | 2 +- t-triggers/pkg-trig-cmd/DEBIAN/postinst | 6 +++--- t-triggers/pkg-trig-cmd/DEBIAN/postrm | 6 +++--- t-triggers/pkg-trig-cmd/DEBIAN/preinst | 6 +++--- t-triggers/pkg-trig-cmd/DEBIAN/prerm | 6 +++--- t-unpack-divert-hardlink/Makefile | 12 ++++++------ 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/t-conffile-obsolete/Makefile b/t-conffile-obsolete/Makefile index 8d1c9b46d..55d9477f5 100644 --- a/t-conffile-obsolete/Makefile +++ b/t-conffile-obsolete/Makefile @@ -21,7 +21,7 @@ test-case: $(DPKG_PURGE) pkg-conff-obsolete # Modified conffile is moved away in .dpkg-bak for the user $(DPKG_INSTALL) pkg-conff-obsolete-0.deb - $(BEROOT) sh -c "echo foo >>$(DPKG_INSTDIR)/test-conffile" + $(BEROOT) sh -c "echo foo >>'$(DPKG_INSTDIR)/test-conffile'" $(DPKG_INSTALL) pkg-conff-obsolete-2.deb test ! -f '$(DPKG_INSTDIR)/test-conffile' test -f '$(DPKG_INSTDIR)/test-conffile.dpkg-bak' diff --git a/t-conffile-prompt/pkg-conff-prompt-0/DEBIAN/postinst b/t-conffile-prompt/pkg-conff-prompt-0/DEBIAN/postinst index 7679f69fa..27be638b8 100755 --- a/t-conffile-prompt/pkg-conff-prompt-0/DEBIAN/postinst +++ b/t-conffile-prompt/pkg-conff-prompt-0/DEBIAN/postinst @@ -1,3 +1,3 @@ #!/bin/sh -echo "test modified" >$DPKG_ROOT/test-conffile +echo "test modified" >"$DPKG_ROOT/test-conffile" echo "test modified spaces" >"$DPKG_ROOT/test-conffile with spaces" diff --git a/t-triggers/pkg-trig-cmd/DEBIAN/postinst b/t-triggers/pkg-trig-cmd/DEBIAN/postinst index eab074e6b..3975be087 100755 --- a/t-triggers/pkg-trig-cmd/DEBIAN/postinst +++ b/t-triggers/pkg-trig-cmd/DEBIAN/postinst @@ -2,11 +2,11 @@ set -e -if [ -e $DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME ]; then - if [ -e $DPKG_ROOT/trigger-noawait ]; then +if [ -e "$DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME" ]; then + if [ -e "$DPKG_ROOT/trigger-noawait" ]; then echo "Executing 'dpkg-trigger --no-await a-trigger' from '$0 $1'" dpkg-trigger --no-await a-trigger - elif [ -e $DPKG_ROOT/trigger-await ]; then + elif [ -e "$DPKG_ROOT/trigger-await" ]; then echo "Executing 'dpkg-trigger --await a-trigger' from '$0 $1'" dpkg-trigger --await a-trigger else diff --git a/t-triggers/pkg-trig-cmd/DEBIAN/postrm b/t-triggers/pkg-trig-cmd/DEBIAN/postrm index eab074e6b..3975be087 100755 --- a/t-triggers/pkg-trig-cmd/DEBIAN/postrm +++ b/t-triggers/pkg-trig-cmd/DEBIAN/postrm @@ -2,11 +2,11 @@ set -e -if [ -e $DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME ]; then - if [ -e $DPKG_ROOT/trigger-noawait ]; then +if [ -e "$DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME" ]; then + if [ -e "$DPKG_ROOT/trigger-noawait" ]; then echo "Executing 'dpkg-trigger --no-await a-trigger' from '$0 $1'" dpkg-trigger --no-await a-trigger - elif [ -e $DPKG_ROOT/trigger-await ]; then + elif [ -e "$DPKG_ROOT/trigger-await" ]; then echo "Executing 'dpkg-trigger --await a-trigger' from '$0 $1'" dpkg-trigger --await a-trigger else diff --git a/t-triggers/pkg-trig-cmd/DEBIAN/preinst b/t-triggers/pkg-trig-cmd/DEBIAN/preinst index eab074e6b..3975be087 100755 --- a/t-triggers/pkg-trig-cmd/DEBIAN/preinst +++ b/t-triggers/pkg-trig-cmd/DEBIAN/preinst @@ -2,11 +2,11 @@ set -e -if [ -e $DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME ]; then - if [ -e $DPKG_ROOT/trigger-noawait ]; then +if [ -e "$DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME" ]; then + if [ -e "$DPKG_ROOT/trigger-noawait" ]; then echo "Executing 'dpkg-trigger --no-await a-trigger' from '$0 $1'" dpkg-trigger --no-await a-trigger - elif [ -e $DPKG_ROOT/trigger-await ]; then + elif [ -e "$DPKG_ROOT/trigger-await" ]; then echo "Executing 'dpkg-trigger --await a-trigger' from '$0 $1'" dpkg-trigger --await a-trigger else diff --git a/t-triggers/pkg-trig-cmd/DEBIAN/prerm b/t-triggers/pkg-trig-cmd/DEBIAN/prerm index eab074e6b..3975be087 100755 --- a/t-triggers/pkg-trig-cmd/DEBIAN/prerm +++ b/t-triggers/pkg-trig-cmd/DEBIAN/prerm @@ -2,11 +2,11 @@ set -e -if [ -e $DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME ]; then - if [ -e $DPKG_ROOT/trigger-noawait ]; then +if [ -e "$DPKG_ROOT/trigger-$DPKG_MAINTSCRIPT_NAME" ]; then + if [ -e "$DPKG_ROOT/trigger-noawait" ]; then echo "Executing 'dpkg-trigger --no-await a-trigger' from '$0 $1'" dpkg-trigger --no-await a-trigger - elif [ -e $DPKG_ROOT/trigger-await ]; then + elif [ -e "$DPKG_ROOT/trigger-await" ]; then echo "Executing 'dpkg-trigger --await a-trigger' from '$0 $1'" dpkg-trigger --await a-trigger else diff --git a/t-unpack-divert-hardlink/Makefile b/t-unpack-divert-hardlink/Makefile index 81bd245ba..75287f74b 100644 --- a/t-unpack-divert-hardlink/Makefile +++ b/t-unpack-divert-hardlink/Makefile @@ -18,12 +18,12 @@ test-case: # test if unpack can divert a hardlink $(DPKG_INSTALL) pkg-hardlink.deb $(call pkg_is_installed,pkg-hardlink) - test -f $(DPKG_INSTDIR)/test-file.distrib - test -f $(DPKG_INSTDIR)/test-hardlink.distrib - cmp $(DPKG_INSTDIR)/test-file.distrib \ - $(DPKG_INSTDIR)/test-hardlink.distrib - test "`stat -c '%i' $(DPKG_INSTDIR)/test-file.distrib`" = \ - "`stat -c '%i' $(DPKG_INSTDIR)/test-hardlink.distrib`" + test -f '$(DPKG_INSTDIR)/test-file.distrib' + test -f '$(DPKG_INSTDIR)/test-hardlink.distrib' + cmp '$(DPKG_INSTDIR)/test-file.distrib' \ + '$(DPKG_INSTDIR)/test-hardlink.distrib' + test "`stat -c '%i' '$(DPKG_INSTDIR)/test-file.distrib'`" = \ + "`stat -c '%i' '$(DPKG_INSTDIR)/test-hardlink.distrib'`" test-clean: $(DPKG_PURGE) pkg-hardlink -- Dpkg.Org's dpkg

