]>
Commit | Line | Data |
---|---|---|
d77b985a DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
d77b985a DK |
6 | setupenvironment |
7 | configarchitecture 'amd64' 'i386' | |
8 | ||
9 | insertinstalledpackage 'libsame' 'i386,amd64' '1' 'Multi-Arch: same' 'required' | |
10 | insertinstalledpackage 'apt' 'i386' '1' 'Depends: libsame (= 1) | |
11 | Essential: yes' 'required' | |
12 | insertinstalledpackage 'apt2' 'amd64' '1' 'Depends: libsame (= 1) | |
13 | Essential: yes' 'required' | |
14 | buildsimplenativepackage 'libsame' 'i386,amd64' '2' 'unstable' 'Multi-Arch: same' '' 'required' | |
15 | buildsimplenativepackage 'apt' 'i386' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' | |
16 | buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' | |
17 | ||
18 | setupaptarchive | |
0eb4af9d | 19 | testsuccess aptget dist-upgrade -s -o Debug::pkgPackageManager=1 |
d77b985a | 20 | |
75a90b93 | 21 | # order in switch libsame:{amd64,i386} are unpacked is irrelevant, as both are installed - but we need to do it together |
0eb4af9d DK |
22 | OUTPUT=rootdir/tmp/testsuccess.output |
23 | LS_U_AMD="$(grep -o -n '^Inst libsame ' $OUTPUT | cut -d: -f1)" | |
24 | LS_U_INT="$(grep -o -n '^Inst libsame:i386 ' $OUTPUT | cut -d: -f1)" | |
25 | LS_C_AMD="$(grep -o -n '^Conf libsame ' $OUTPUT | cut -d: -f1)" | |
26 | LS_C_INT="$(grep -o -n '^Conf libsame:i386 ' $OUTPUT | cut -d: -f1)" | |
670cf354 | 27 | |
0eb4af9d | 28 | msgtest 'Test if' 'libsame:amd64 unpack before configure' |
670cf354 DK |
29 | test "$LS_U_AMD" -lt "$LS_C_AMD" && msgpass || msgfail |
30 | ||
0eb4af9d | 31 | msgtest 'Test if' 'libsame:i386 unpack before configure' |
670cf354 DK |
32 | test "$LS_U_INT" -lt "$LS_C_INT" && msgpass || msgfail |
33 | ||
0eb4af9d | 34 | msgtest 'Test if' 'libsame:amd64 unpack is before libsame:i386 configure' |
670cf354 DK |
35 | test "$LS_U_AMD" -lt "$LS_C_INT" && msgpass || msgfail |
36 | ||
0eb4af9d | 37 | msgtest 'Test if' 'libsame:i386 unpack is before libsame:amd64 configure' |
670cf354 | 38 | test "$LS_U_INT" -lt "$LS_C_AMD" && msgpass || msgfail |
4b10240c DK |
39 | |
40 | # lets see if it really does work out | |
41 | testsuccess apt dist-upgrade -y |