]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-835094-configure-before-purge
test: Use a file to determine TEST_DEFAULT_GROUP
[apt.git] / test / integration / test-bug-835094-configure-before-purge
CommitLineData
fb51ce32
DK
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6setupenvironment
7configarchitecture 'amd64'
8
9buildsimplenativepackage 'kernel' 'amd64' '1' 'unstable' 'Depends: initramfs-tools | linux-initramfs-tool'
10
11#buildsimplenativepackage 'initramfs-tools' 'amd64' '1.0.16' 'unstable' 'Provides: linux-initramfs-tool'
12setupsimplenativepackage 'initramfs-tools' 'amd64' '1' 'unstable' 'Provides: linux-initramfs-tool'
13BUILDDIR='incoming/initramfs-tools-1'
14mkdir -p "${BUILDDIR}/debian/initramfs-tools/etc"
15echo 'foo2=bar2;' > "${BUILDDIR}/init.conf"
16echo 'init.conf /etc/init.conf' >> "${BUILDDIR}/debian/install"
17buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
18rm -rf "$BUILDDIR"
19
20buildsimplenativepackage 'dracut' 'amd64' '1' 'unstable' 'Provides: linux-initramfs-tool
21Conflicts: initramfs-tools'
22
23setupaptarchive
24
25testdpkgnotinstalled 'kernel' 'initramfs-tools' 'dracut'
26testsuccess apt install kernel -y
27testdpkginstalled 'kernel' 'initramfs-tools'
28testsuccess test -s rootdir/etc/init.conf
29testsuccessequal 'Reading package lists...
30Building dependency tree...
31Reading state information...
32The following packages will be REMOVED:
33 initramfs-tools*
34The following NEW packages will be installed:
35 dracut
360 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
37Purg initramfs-tools [1] [kernel:amd64 ]
38Inst dracut (1 unstable [amd64])
39Conf dracut (1 unstable [amd64])' apt install --purge dracut -s
40testsuccess apt install --purge dracut -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0
41testsuccess apt install --purge dracut -y
42testdpkginstalled 'kernel' 'dracut'
43testdpkgnotinstalled 'initramfs-tools'
44testsuccess test ! -s rootdir/etc/init.conf