blob: 0b6e702123458ec5aea6469243b1ce498aa19f9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
set -e
TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture 'amd64' 'i386'
mkdir -p DEBIAN/
echo "#!/bin/sh\nexit 1" > DEBIAN/postinst
chmod 755 DEBIAN/postinst
buildsimplenativepackage 'postinst-error' 'amd64,i386' '0.8.15' 'stable' '' 'pkg with posinst error' '' '' './DEBIAN'
setupaptarchive
exec 3> apt-progress.log
testfailure aptget install postinst-error -y -o APT::Status-Fd=3
msgtest "Ensure correct error message for postinst error"
grep -q "pmerror:postinst-error :80:subprocess installed post-installation script returned error exit status 2" apt-progress.log && msgpass || msgfail
|