From cbffab246997fb5a06211dfb706b54e5ae5bb59f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 16:58:51 +0200 Subject: Adding upstream version 1.21.22. Signed-off-by: Daniel Baumann --- tests/t-predepends-no-triggers/Makefile | 28 ++++++++++++++++++++++ .../pkg-predepends/DEBIAN/control | 8 +++++++ .../pkg-real/DEBIAN/control | 8 +++++++ .../pkg-real/trigger/a-file | 1 + .../pkg-trigger/DEBIAN/control | 8 +++++++ .../pkg-trigger/DEBIAN/postinst | 3 +++ .../pkg-trigger/DEBIAN/triggers | 1 + 7 files changed, 57 insertions(+) create mode 100644 tests/t-predepends-no-triggers/Makefile create mode 100644 tests/t-predepends-no-triggers/pkg-predepends/DEBIAN/control create mode 100644 tests/t-predepends-no-triggers/pkg-real/DEBIAN/control create mode 100644 tests/t-predepends-no-triggers/pkg-real/trigger/a-file create mode 100644 tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/control create mode 100755 tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/postinst create mode 100644 tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/triggers (limited to 'tests/t-predepends-no-triggers') diff --git a/tests/t-predepends-no-triggers/Makefile b/tests/t-predepends-no-triggers/Makefile new file mode 100644 index 0000000..962cf93 --- /dev/null +++ b/tests/t-predepends-no-triggers/Makefile @@ -0,0 +1,28 @@ +TESTS_DEB := pkg-real pkg-predepends pkg-trigger + +include ../Test.mk + +test-case: + # Install the file trigger + $(DPKG_INSTALL) pkg-trigger.deb + # Install the pre-dependency with --no-triggers + $(DPKG_INSTALL) --no-triggers pkg-real.deb + $(call pkg_status_is,pkg-real,install ok triggers-awaited) + # Should pass even if not yet configured... + $(DPKG_UNPACK) --no-triggers pkg-predepends.deb + # ...by running the required triggers + $(call pkg_status_is,pkg-real,install ok installed) + # Retry again, this time the trigger processing is not required + # because pkg-real has already been configured once + $(DPKG_PURGE) pkg-predepends + $(DPKG_INSTALL) --no-triggers pkg-real.deb + $(call pkg_status_is,pkg-real,install ok triggers-awaited) + $(DPKG_UNPACK) --no-triggers pkg-predepends.deb + $(call pkg_status_is,pkg-real,install ok triggers-awaited) + # Cleanup + $(DPKG_PURGE) pkg-predepends + $(DPKG_PURGE) pkg-real + $(DPKG_PURGE) pkg-trigger + +test-clean: + -$(DPKG_PURGE) pkg-predepends pkg-real pkg-trigger diff --git a/tests/t-predepends-no-triggers/pkg-predepends/DEBIAN/control b/tests/t-predepends-no-triggers/pkg-predepends/DEBIAN/control new file mode 100644 index 0000000..33b5450 --- /dev/null +++ b/tests/t-predepends-no-triggers/pkg-predepends/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-predepends +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Pre-Depends: pkg-real +Description: test package - package pre-depending on a real package diff --git a/tests/t-predepends-no-triggers/pkg-real/DEBIAN/control b/tests/t-predepends-no-triggers/pkg-real/DEBIAN/control new file mode 100644 index 0000000..9428516 --- /dev/null +++ b/tests/t-predepends-no-triggers/pkg-real/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-real +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - real package to pre-depend on + Contains a file that will activate a trigger. diff --git a/tests/t-predepends-no-triggers/pkg-real/trigger/a-file b/tests/t-predepends-no-triggers/pkg-real/trigger/a-file new file mode 100644 index 0000000..e7ee9ee --- /dev/null +++ b/tests/t-predepends-no-triggers/pkg-real/trigger/a-file @@ -0,0 +1 @@ +Just a file. diff --git a/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/control b/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/control new file mode 100644 index 0000000..19519d9 --- /dev/null +++ b/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-trigger +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - interested in a file trigger on /trigger + Contains a file that will activate a trigger. diff --git a/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/postinst b/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/postinst new file mode 100755 index 0000000..c52d3c2 --- /dev/null +++ b/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/postinst @@ -0,0 +1,3 @@ +#!/bin/sh + +exit 0 diff --git a/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/triggers b/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/triggers new file mode 100644 index 0000000..91238aa --- /dev/null +++ b/tests/t-predepends-no-triggers/pkg-trigger/DEBIAN/triggers @@ -0,0 +1 @@ +interest /trigger -- cgit v1.2.3