diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:35:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:35:28 +0000 |
commit | ea314d2f45c40a006c0104157013ab4b857f665f (patch) | |
tree | 3ef2971cb3675c318b8d9effd987854ad3f6d3e8 /tests/t-unpack-divert-overwrite/Makefile | |
parent | Initial commit. (diff) | |
download | dpkg-ea314d2f45c40a006c0104157013ab4b857f665f.tar.xz dpkg-ea314d2f45c40a006c0104157013ab4b857f665f.zip |
Adding upstream version 1.22.4.upstream/1.22.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/t-unpack-divert-overwrite/Makefile | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/t-unpack-divert-overwrite/Makefile b/tests/t-unpack-divert-overwrite/Makefile new file mode 100644 index 0000000..1ddfdab --- /dev/null +++ b/tests/t-unpack-divert-overwrite/Makefile @@ -0,0 +1,64 @@ +TESTS_DEB := pkg-files pkg-divert pkg-replaces + +include ../Test.mk + +test-case: + # Test failure to install a package overwriting a diversion (order 1). + $(DPKG_INSTALL) pkg-divert.deb + test -e $(DPKG_INSTDIR)/test-file + ! test -e $(DPKG_INSTDIR)/test-other + $(DPKG_INSTALL) pkg-files.deb + test -e $(DPKG_INSTDIR)/test-file + test -e $(DPKG_INSTDIR)/test-other + ! $(DPKG_INSTALL) pkg-replaces.deb + test -e $(DPKG_INSTDIR)/test-file + test -e $(DPKG_INSTDIR)/test-other + $(call pkg_is_installed,pkg-divert) + $(call pkg_is_not_installed,pkg-replaces) + $(DPKG_PURGE) pkg-files + $(DPKG_PURGE) pkg-divert + $(DPKG_PURGE) pkg-replaces + ! test -e $(DPKG_INSTDIR)/test-file + ! test -e $(DPKG_INSTDIR)/test-other + : + # Test failure to install a package overwriting a diversion (order 2). + $(DPKG_INSTALL) pkg-files.deb + test -e $(DPKG_INSTDIR)/test-file + ! test -e $(DPKG_INSTDIR)/test-other + $(DPKG_INSTALL) pkg-divert.deb + test -e $(DPKG_INSTDIR)/test-file + test -e $(DPKG_INSTDIR)/test-other + ! $(DPKG_INSTALL) pkg-replaces.deb + test -e $(DPKG_INSTDIR)/test-file + test -e $(DPKG_INSTDIR)/test-other + $(call pkg_is_installed,pkg-divert) + $(call pkg_is_not_installed,pkg-replaces) + $(DPKG_PURGE) pkg-files + $(DPKG_PURGE) pkg-divert + $(DPKG_PURGE) pkg-replaces + ! test -e $(DPKG_INSTDIR)/test-file + ! test -e $(DPKG_INSTDIR)/test-other + : + # Test success to install a package overwriting a diversion (forced). + $(DPKG_INSTALL) pkg-files.deb + test -e $(DPKG_INSTDIR)/test-file + ! test -e $(DPKG_INSTDIR)/test-other + $(DPKG_INSTALL) pkg-divert.deb + test -e $(DPKG_INSTDIR)/test-file + test -e $(DPKG_INSTDIR)/test-other + $(DPKG_INSTALL) --force-overwrite-diverted pkg-replaces.deb + test -e $(DPKG_INSTDIR)/test-file + test -e $(DPKG_INSTDIR)/test-other + $(call pkg_is_installed,pkg-divert) + $(call pkg_is_installed,pkg-replaces) + $(DPKG_PURGE) pkg-replaces + $(DPKG_PURGE) pkg-divert + $(DPKG_PURGE) pkg-files + ! test -e $(DPKG_INSTDIR)/test-file + ! test -e $(DPKG_INSTDIR)/test-other + + # XXX: In the force case, if we purge pkg-replaces last, then it + # will leave behind on the fsys an unowned file. + +test-clean: + $(DPKG_PURGE) pkg-files pkg-divert pkg-replaces |