summaryrefslogtreecommitdiffstats
path: root/test/integration/test-bug-835094-configure-before-purge
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 18:07:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 18:07:13 +0000
commit636c7dc17286d93d788c741d15fd756aeda066d5 (patch)
treee7ae158cc54f591041a061b9865bcae51854f15c /test/integration/test-bug-835094-configure-before-purge
parentInitial commit. (diff)
downloadapt-636c7dc17286d93d788c741d15fd756aeda066d5.tar.xz
apt-636c7dc17286d93d788c741d15fd756aeda066d5.zip
Adding upstream version 1.8.2.3.upstream/1.8.2.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xtest/integration/test-bug-835094-configure-before-purge44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/integration/test-bug-835094-configure-before-purge b/test/integration/test-bug-835094-configure-before-purge
new file mode 100755
index 0000000..16a196c
--- /dev/null
+++ b/test/integration/test-bug-835094-configure-before-purge
@@ -0,0 +1,44 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+setupenvironment
+configarchitecture 'amd64'
+
+buildsimplenativepackage 'kernel' 'amd64' '1' 'unstable' 'Depends: initramfs-tools | linux-initramfs-tool'
+
+#buildsimplenativepackage 'initramfs-tools' 'amd64' '1.0.16' 'unstable' 'Provides: linux-initramfs-tool'
+setupsimplenativepackage 'initramfs-tools' 'amd64' '1' 'unstable' 'Provides: linux-initramfs-tool'
+BUILDDIR='incoming/initramfs-tools-1'
+mkdir -p "${BUILDDIR}/debian/initramfs-tools/etc"
+echo 'foo2=bar2;' > "${BUILDDIR}/init.conf"
+echo 'init.conf /etc/init.conf' >> "${BUILDDIR}/debian/install"
+buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
+rm -rf "$BUILDDIR"
+
+buildsimplenativepackage 'dracut' 'amd64' '1' 'unstable' 'Provides: linux-initramfs-tool
+Conflicts: initramfs-tools'
+
+setupaptarchive
+
+testdpkgnotinstalled 'kernel' 'initramfs-tools' 'dracut'
+testsuccess apt install kernel -y
+testdpkginstalled 'kernel' 'initramfs-tools'
+testsuccess test -s rootdir/etc/init.conf
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ initramfs-tools*
+The following NEW packages will be installed:
+ dracut
+0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
+Purg initramfs-tools [1] [kernel:amd64 ]
+Inst dracut (1 unstable [amd64])
+Conf dracut (1 unstable [amd64])' apt install --purge dracut -s
+testsuccess apt install --purge dracut -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0
+testsuccess apt install --purge dracut -y
+testdpkginstalled 'kernel' 'dracut'
+testdpkgnotinstalled 'initramfs-tools'
+testsuccess test ! -s rootdir/etc/init.conf