From b86570f63e533abcbcb97c2572e0e5732a96307b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 11:40:31 +0200 Subject: Adding upstream version 1.20.13. Signed-off-by: Daniel Baumann --- tests/t-switch-dir-to-symlink-rel/Makefile | 156 +++++++++++++++++++++ .../pkg-dir-conffile-0/DEBIAN/conffiles | 1 + .../pkg-dir-conffile-0/DEBIAN/control | 7 + .../test-path/test-subpath/file-conf | 0 .../pkg-dir-conffile-1/DEBIAN/control | 7 + .../pkg-dir-conffile-1/DEBIAN/postinst | 6 + .../pkg-dir-conffile-1/DEBIAN/postrm | 6 + .../pkg-dir-conffile-1/DEBIAN/preinst | 6 + .../pkg-dir-file-moved/DEBIAN/control | 7 + .../pkg-dir-file-moved/test-dir/file-normal | 0 .../pkg-dir-file-other/DEBIAN/control | 7 + .../test-path/test-subpath/file-other | 0 .../pkg-dir-symlink-ext-0/DEBIAN/control | 7 + .../test-path/test-subpath/file-normal | 0 .../pkg-dir-symlink-ext-1/DEBIAN/control | 8 ++ .../pkg-dir-symlink-ext-1/DEBIAN/postinst | 6 + .../pkg-dir-symlink-ext-1/DEBIAN/postrm | 6 + .../pkg-dir-symlink-ext-1/DEBIAN/preinst | 6 + .../pkg-dir-symlink-int-0/DEBIAN/control | 7 + .../test-path/test-subpath/file-normal | 0 .../pkg-dir-symlink-int-1/DEBIAN/control | 7 + .../pkg-dir-symlink-int-1/DEBIAN/postinst | 6 + .../pkg-dir-symlink-int-1/DEBIAN/postrm | 6 + .../pkg-dir-symlink-int-1/DEBIAN/preinst | 6 + .../pkg-dir-symlink-int-1/test-dir/file-other | 0 25 files changed, 268 insertions(+) create mode 100644 tests/t-switch-dir-to-symlink-rel/Makefile create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/DEBIAN/conffiles create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/DEBIAN/control create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/test-path/test-subpath/file-conf create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/control create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/postinst create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/postrm create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/preinst create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-file-moved/DEBIAN/control create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-file-moved/test-dir/file-normal create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-file-other/DEBIAN/control create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-file-other/test-path/test-subpath/file-other create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-0/DEBIAN/control create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-0/test-path/test-subpath/file-normal create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/control create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/postinst create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/postrm create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/preinst create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-0/DEBIAN/control create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-0/test-path/test-subpath/file-normal create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/control create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/postinst create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/postrm create mode 100755 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/preinst create mode 100644 tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/test-dir/file-other (limited to 'tests/t-switch-dir-to-symlink-rel') diff --git a/tests/t-switch-dir-to-symlink-rel/Makefile b/tests/t-switch-dir-to-symlink-rel/Makefile new file mode 100644 index 0000000..ae4056b --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/Makefile @@ -0,0 +1,156 @@ +TESTS_DEB := \ + pkg-dir-conffile-0 pkg-dir-conffile-1 \ + pkg-dir-file-other pkg-dir-symlink-int-0 pkg-dir-symlink-int-1 \ + pkg-dir-file-moved pkg-dir-symlink-ext-0 pkg-dir-symlink-ext-1 + +include ../Test.mk + +build-hook: + mkdir -p pkg-dir-conffile-1/test-path + ln -sf ../test-dir pkg-dir-conffile-1/test-path/test-subpath + mkdir -p pkg-dir-symlink-ext-1/test-path + ln -sf ../test-dir pkg-dir-symlink-ext-1/test-path/test-subpath + mkdir -p pkg-dir-symlink-int-1/test-path + ln -sf ../test-dir pkg-dir-symlink-int-1/test-path/test-subpath + +clean-hook: + $(RM) pkg-dir-conffile-1/test-path/test-subpath + -rmdir pkg-dir-conffile-1/test-path + $(RM) pkg-dir-symlink-ext-1/test-path/test-subpath + -rmdir pkg-dir-symlink-ext-1/test-path + $(RM) pkg-dir-symlink-int-1/test-path/test-subpath + -rmdir pkg-dir-symlink-int-1/test-path + +test-case: + # Cannot switch a directory containing conffiles + $(DPKG_INSTALL) pkg-dir-conffile-0.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + ! $(DPKG_INSTALL) pkg-dir-conffile-1.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_PURGE) pkg-dir-conffile + + # Cannot switch a directory containing files owned by another package + $(DPKG_INSTALL) pkg-dir-file-other.deb + $(DPKG_INSTALL) pkg-dir-symlink-int-0.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + ! $(DPKG_INSTALL) pkg-dir-symlink-int-1.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_PURGE) pkg-dir-symlink-int + $(DPKG_PURGE) pkg-dir-file-other + + # Cannot switch a directory containing local files + $(DPKG_INSTALL) pkg-dir-symlink-int-0.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + touch '$(DPKG_INSTDIR)/test-path/test-subpath/local file' + ! $(DPKG_INSTALL) pkg-dir-symlink-int-1.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + rm '$(DPKG_INSTDIR)/test-path/test-subpath/local file' + $(DPKG_PURGE) pkg-dir-symlink-int + + # + # Otherwise allow the switch + # + + # Switch a directory to a symlink, contents moved within the package, + # with intermediate full installs. + $(DPKG_INSTALL) pkg-dir-symlink-int-0.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_INSTALL) pkg-dir-symlink-int-1.deb + test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_PURGE) pkg-dir-symlink-int + ! test -e '$(DPKG_INSTDIR)/test-path/test-subpath' + + # Switch a directory to a symlink, contents moved within the package, + # with full install, upgrade with upack and configure. + $(DPKG_INSTALL) pkg-dir-symlink-int-0.deb + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_UNPACK) pkg-dir-symlink-int-1.deb + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_CONFIGURE) pkg-dir-symlink-int + test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_PURGE) pkg-dir-symlink-int + ! test -e '$(DPKG_INSTDIR)/test-path/test-subpath' + + # Switch a directory to a symlink, contents moved within the package, + # with two unpacks and configure. + $(DPKG_UNPACK) pkg-dir-symlink-int-0.deb + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_UNPACK) pkg-dir-symlink-int-1.deb + ! test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_CONFIGURE) pkg-dir-symlink-int + test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_PURGE) pkg-dir-symlink-int + ! test -e '$(DPKG_INSTDIR)/test-path/test-subpath' + + # Switch a directory to a symlink, contents moved to another package, + # with intermediate full installs. + $(DPKG_INSTALL) pkg-dir-symlink-ext-0.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_INSTALL) pkg-dir-file-moved.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-dir' + $(DPKG_INSTALL) pkg-dir-symlink-ext-1.deb + test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + test "`readlink '$(DPKG_INSTDIR)/test-path/test-subpath'`" = "../test-dir" + ! test -h '$(DPKG_INSTDIR)/test-dir' + test -d '$(DPKG_INSTDIR)/test-dir' + test -f '$(DPKG_INSTDIR)/test-dir/file-normal' + $(DPKG_PURGE) pkg-dir-symlink-ext + $(DPKG_PURGE) pkg-dir-file-moved + + # Switch a directory to a symlink, contents moved to another package, + # with full installs, upgrade with upack and configure. + $(DPKG_INSTALL) pkg-dir-symlink-ext-0.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_INSTALL) pkg-dir-file-moved.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-dir' + $(DPKG_UNPACK) pkg-dir-symlink-ext-1.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-dir' + $(DPKG_CONFIGURE) -a + test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + test "`readlink '$(DPKG_INSTDIR)/test-path/test-subpath'`" = "../test-dir" + ! test -h '$(DPKG_INSTDIR)/test-dir' + test -d '$(DPKG_INSTDIR)/test-dir' + test -f '$(DPKG_INSTDIR)/test-dir/file-normal' + $(DPKG_PURGE) pkg-dir-symlink-ext + $(DPKG_PURGE) pkg-dir-file-moved + + # Switch a directory to a symlink, contents moved to another package, + # with three unpacks and configure. + $(DPKG_UNPACK) pkg-dir-symlink-ext-0.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + $(DPKG_UNPACK) pkg-dir-file-moved.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-dir' + $(DPKG_UNPACK) pkg-dir-symlink-ext-1.deb + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-dir' + $(DPKG_CONFIGURE) -a + test -h '$(DPKG_INSTDIR)/test-path/test-subpath' + test -d '$(DPKG_INSTDIR)/test-path/test-subpath' + test "`readlink '$(DPKG_INSTDIR)/test-path/test-subpath'`" = "../test-dir" + ! test -h '$(DPKG_INSTDIR)/test-dir' + test -d '$(DPKG_INSTDIR)/test-dir' + test -f '$(DPKG_INSTDIR)/test-dir/file-normal' + $(DPKG_PURGE) pkg-dir-symlink-ext + $(DPKG_PURGE) pkg-dir-file-moved + +test-clean: + $(DPKG_PURGE) pkg-dir-conffile + $(DPKG_PURGE) pkg-dir-symlink-int + $(DPKG_PURGE) pkg-dir-symlink-ext + $(DPKG_PURGE) pkg-dir-file-other + $(DPKG_PURGE) pkg-dir-file-moved diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/DEBIAN/conffiles b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/DEBIAN/conffiles new file mode 100644 index 0000000..77b39da --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/DEBIAN/conffiles @@ -0,0 +1 @@ +/test-path/test-subpath/file-conf diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/DEBIAN/control b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/DEBIAN/control new file mode 100644 index 0000000..57fdc53 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-dir-conffile +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - package with dir to be switched to symlink diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/test-path/test-subpath/file-conf b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-0/test-path/test-subpath/file-conf new file mode 100644 index 0000000..e69de29 diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/control b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/control new file mode 100644 index 0000000..69f4d74 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-dir-conffile +Version: 1 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - package switching dir to symlink diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/postinst b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/postinst new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/postinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/postrm b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/postrm new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/postrm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/preinst b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/preinst new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-conffile-1/DEBIAN/preinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-moved/DEBIAN/control b/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-moved/DEBIAN/control new file mode 100644 index 0000000..db492dd --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-moved/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-dir-file-moved +Version: 1 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - package with file moved from dir-to-symlink switch diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-moved/test-dir/file-normal b/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-moved/test-dir/file-normal new file mode 100644 index 0000000..e69de29 diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-other/DEBIAN/control b/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-other/DEBIAN/control new file mode 100644 index 0000000..985c6db --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-other/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-dir-file-other +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - package with real dir and contents diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-other/test-path/test-subpath/file-other b/tests/t-switch-dir-to-symlink-rel/pkg-dir-file-other/test-path/test-subpath/file-other new file mode 100644 index 0000000..e69de29 diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-0/DEBIAN/control b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-0/DEBIAN/control new file mode 100644 index 0000000..f9aca91 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-0/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-dir-symlink-ext +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - package with dir to be switched to symlink diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-0/test-path/test-subpath/file-normal b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-0/test-path/test-subpath/file-normal new file mode 100644 index 0000000..e69de29 diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/control b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/control new file mode 100644 index 0000000..255195b --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-dir-symlink-ext +Version: 1 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Depends: pkg-dir-file-moved (>= 1) +Description: test package - package switching dir to symlink diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/postinst b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/postinst new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/postinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/postrm b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/postrm new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/postrm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/preinst b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/preinst new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-ext-1/DEBIAN/preinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-0/DEBIAN/control b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-0/DEBIAN/control new file mode 100644 index 0000000..3526664 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-0/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-dir-symlink-int +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - package with dir to be switched to symlink diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-0/test-path/test-subpath/file-normal b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-0/test-path/test-subpath/file-normal new file mode 100644 index 0000000..e69de29 diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/control b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/control new file mode 100644 index 0000000..6852587 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-dir-symlink-int +Version: 1 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - package switching dir to symlink diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/postinst b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/postinst new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/postinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/postrm b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/postrm new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/postrm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/preinst b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/preinst new file mode 100755 index 0000000..572dfa2 --- /dev/null +++ b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/DEBIAN/preinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if dpkg-maintscript-helper supports dir_to_symlink; then + dpkg-maintscript-helper dir_to_symlink \ + /test-path/test-subpath ../test-dir 0 -- "$@" +fi diff --git a/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/test-dir/file-other b/tests/t-switch-dir-to-symlink-rel/pkg-dir-symlink-int-1/test-dir/file-other new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3