test-apt-progress-fd-error 849 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'native'
  7. mkdir -p usr/bin
  8. touch usr/bin/file-conflict
  9. buildsimplenativepackage 'foo1' 'native' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
  10. buildsimplenativepackage 'foo2' 'native' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
  11. insertinstalledpackage 'apport' 'native' '1'
  12. setupaptarchive
  13. exec 3> apt-progress.log
  14. testfailure aptget install foo1 foo2 -y -o APT::Status-Fd=3
  15. msgtest 'Ensure correct error message'
  16. testsuccess --nomsg grep "foo2_0.8.15_[^.]\+.deb:36.3636:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log
  17. testsuccess test -s rootdir/var/crash/foo2.0.crash
  18. testsuccess grep '^Package: foo2 0.8.15$' rootdir/var/crash/foo2.0.crash