test-bug-835094-configure-before-purge 1.6 KB

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