summaryrefslogtreecommitdiffstats
path: root/tests/t-disappear-diverted-other/pkg-divert
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/t-disappear-diverted-other/pkg-divert/DEBIAN/control8
-rwxr-xr-xtests/t-disappear-diverted-other/pkg-divert/DEBIAN/postrm8
-rwxr-xr-xtests/t-disappear-diverted-other/pkg-divert/DEBIAN/preinst8
-rw-r--r--tests/t-disappear-diverted-other/pkg-divert/test-dir/test-normal0
-rw-r--r--tests/t-disappear-diverted-other/pkg-diverted/DEBIAN/control8
-rw-r--r--tests/t-disappear-diverted-other/pkg-diverted/test-dir/test-divert0
6 files changed, 32 insertions, 0 deletions
diff --git a/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/control b/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/control
new file mode 100644
index 0000000..b304762
--- /dev/null
+++ b/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-divert
+Version: 0.0-1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Description: test package - divert on disappearing package
+
diff --git a/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/postrm b/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/postrm
new file mode 100755
index 0000000..98891f6
--- /dev/null
+++ b/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/postrm
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "purge" ] || [ "$1" = "disappear" ]; then
+ dpkg-divert --rename --remove /test-dir/test-divert
+fi
+
diff --git a/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/preinst b/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/preinst
new file mode 100755
index 0000000..ad840e6
--- /dev/null
+++ b/tests/t-disappear-diverted-other/pkg-divert/DEBIAN/preinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+ dpkg-divert --rename --add /test-dir/test-divert
+fi
+
diff --git a/tests/t-disappear-diverted-other/pkg-divert/test-dir/test-normal b/tests/t-disappear-diverted-other/pkg-divert/test-dir/test-normal
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/t-disappear-diverted-other/pkg-divert/test-dir/test-normal
diff --git a/tests/t-disappear-diverted-other/pkg-diverted/DEBIAN/control b/tests/t-disappear-diverted-other/pkg-diverted/DEBIAN/control
new file mode 100644
index 0000000..cb428af
--- /dev/null
+++ b/tests/t-disappear-diverted-other/pkg-diverted/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-diverted
+Version: 0.0-1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Description: test package - diverted
+
diff --git a/tests/t-disappear-diverted-other/pkg-diverted/test-dir/test-divert b/tests/t-disappear-diverted-other/pkg-diverted/test-dir/test-divert
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/t-disappear-diverted-other/pkg-diverted/test-dir/test-divert