4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64' 'i386'
9 buildsimplenativepackage
'toolkit' 'all' '1' 'stable' 'Multi-Arch: foreign'
10 buildsimplenativepackage
'toolkit' 'amd64' '2' 'unstable' 'Multi-Arch: foreign'
11 buildsimplenativepackage
'libsame' 'i386,amd64' '1' 'stable' 'Multi-Arch: same'
12 buildsimplenativepackage
'libsame' 'i386,amd64' '2' 'unstable' 'Multi-Arch: same'
13 buildsimplenativepackage
'stuff' 'i386,amd64' '1' 'stable' 'Depends: libsame (= 1), toolkit (= 1)'
14 buildsimplenativepackage
'stuff' 'i386,amd64' '2' 'unstable' 'Depends: libsame (= 2), toolkit (= 2)'
18 hook
='pre-install-pkgs'
23 if echo \"\$line\" | grep -Fq '**'; then
26 done > ${hook}-v${1}.list" > ${hook}-v${1}.sh
27 chmod +x
${hook}-v${1}.sh
28 echo "dpkg::${hook}:: \"./${hook}-v${1}.sh --foo -bar\";
29 DPkg::Tools::options::\"./${hook}-v${1}.sh\"::Version \"$1\";" > rootdir
/etc
/apt
/apt.conf.d
/hook
-v$1
36 rm -f ${hook}-v2.list
${hook}-v3.list
37 msgtest
'Observe hooks while' "$*"
38 aptget
"$@" -y --force-yes >/dev
/null
2>&1 && msgpass
|| msgfail
41 observehook
install stuff
-t stable
42 testfileequal
"${hook}-v2.list" 'libsame - < 1 **CONFIGURE**
43 toolkit - < 1 **CONFIGURE**
44 stuff - < 1 **CONFIGURE**'
45 testfileequal
"${hook}-v3.list" 'libsame - - none < 1 amd64 same **CONFIGURE**
46 toolkit - - none < 1 all foreign **CONFIGURE**
47 stuff - - none < 1 amd64 none **CONFIGURE**'
49 observehook
install stuff
-t unstable
50 testfileequal
"${hook}-v2.list" 'libsame 1 < 2 **CONFIGURE**
51 toolkit 1 < 2 **CONFIGURE**
52 stuff 1 < 2 **CONFIGURE**'
53 testfileequal
"${hook}-v3.list" 'libsame 1 amd64 same < 2 amd64 same **CONFIGURE**
54 toolkit 1 all foreign < 2 amd64 foreign **CONFIGURE**
55 stuff 1 amd64 none < 2 amd64 none **CONFIGURE**'
57 observehook
install stuff
:i386
-t unstable
58 testfileequal
"${hook}-v2.list" 'stuff 2 > - **REMOVE**
59 libsame - < 2 **CONFIGURE**
60 stuff - < 2 **CONFIGURE**'
61 testfileequal
"${hook}-v3.list" 'stuff 2 amd64 none > - - none **REMOVE**
62 libsame - - none < 2 i386 same **CONFIGURE**
63 stuff - - none < 2 i386 none **CONFIGURE**'
65 observehook remove libsame
66 testfileequal
"${hook}-v2.list" 'libsame 2 > - **REMOVE**'
67 testfileequal
"${hook}-v3.list" 'libsame 2 amd64 same > - - none **REMOVE**'
69 observehook
install stuff
:i
386/stable libsame
:i
386/stable toolkit
/stable
70 testfileequal
"${hook}-v2.list" 'libsame 2 > 1 **CONFIGURE**
71 toolkit 2 > 1 **CONFIGURE**
72 stuff 2 > 1 **CONFIGURE**'
73 testfileequal
"${hook}-v3.list" 'libsame 2 i386 same > 1 i386 same **CONFIGURE**
74 toolkit 2 amd64 foreign > 1 all foreign **CONFIGURE**
75 stuff 2 i386 none > 1 i386 none **CONFIGURE**'
77 observehook
install 'libsame:*'
78 testfileequal
"${hook}-v2.list" 'libsame 1 < 2 **CONFIGURE**
79 libsame - < 2 **CONFIGURE**
80 toolkit 1 < 2 **CONFIGURE**
81 stuff 1 < 2 **CONFIGURE**'
82 testfileequal
"${hook}-v3.list" 'libsame 1 i386 same < 2 i386 same **CONFIGURE**
83 libsame - - none < 2 amd64 same **CONFIGURE**
84 toolkit 1 all foreign < 2 amd64 foreign **CONFIGURE**
85 stuff 1 i386 none < 2 i386 none **CONFIGURE**'
87 observehook purge stuff
:i386
'libsame:*' toolkit
88 testfileequal
"${hook}-v2.list" 'libsame 2 > - **REMOVE**
89 stuff 2 > - **REMOVE**
90 libsame 2 > - **REMOVE**
91 toolkit 2 > - **REMOVE**'
92 testfileequal
"${hook}-v3.list" 'libsame 2 amd64 same > - - none **REMOVE**
93 stuff 2 i386 none > - - none **REMOVE**
94 libsame 2 i386 same > - - none **REMOVE**
95 toolkit 2 amd64 foreign > - - none **REMOVE**'