4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64' 'i386'
9 insertinstalledpackage
'cool' 'all' '1'
10 insertinstalledpackage
'stuff' 'all' '1'
11 insertinstalledpackage
'somestuff' 'all' '1' 'Depends: cool, stuff'
13 insertpackage
'unstable' 'cool' 'all' '2' 'Multi-Arch: foreign'
14 insertpackage
'unstable' 'stuff' 'all' '2' 'Multi-Arch: foreign'
15 insertpackage
'unstable' 'coolstuff' 'i386,amd64' '2' 'Depends: cool, stuff'
16 insertpackage
'unstable' 'awesome' 'all' '2' 'Multi-Arch: foreign
18 insertpackage
'unstable' 'badstuff' 'all' '2' 'Multi-Arch: foreign
20 insertpackage
'unstable' 'awesomecoolstuff' 'i386' '2' 'Depends: coolstuff, awesome'
22 insertpackage
'experimental' 'cool' 'all' '3' 'Multi-Arch: foreign'
23 insertpackage
'experimental' 'stuff' 'all' '3' 'Multi-Arch: foreign'
24 insertpackage
'experimental' 'coolstuff' 'i386,amd64' '3' 'Depends: cool, stuff'
28 testfailure aptget
install --solver dump coolstuff
-s
29 testsuccess
grep ERR_NO_FILENAME rootdir
/tmp
/testfailure.output
30 export APT_EDSP_DUMP_FILENAME
="${TMPWORKINGDIRECTORY}/downloaded/dump.edsp"
32 testfailureequal
'Reading package lists...
33 Building dependency tree...
34 Execute external solver...
35 The solver encountered an error of type: ERR_JUST_DUMPING
36 The following information might help you to understand what is wrong:
37 I am too dumb, i can just dump!
38 Please use one of my friends instead!
40 E: External solver failed with: I am too dumb, i can just dump!' aptget
install --solver dump coolstuff
-s
41 testsuccess
test -s "$APT_EDSP_DUMP_FILENAME"
42 rm -f "$APT_EDSP_DUMP_FILENAME"
44 testsuccessequal
'Reading package lists...
45 Building dependency tree...
46 Execute external solver...
47 The following NEW packages will be installed:
49 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
50 Inst coolstuff (2 unstable [amd64])
51 Conf coolstuff (2 unstable [amd64])' aptget
install --solver apt coolstuff
-s
53 testsuccessequal
'Reading package lists...
54 Building dependency tree...
55 Execute external solver...
56 The following NEW packages will be installed:
58 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
59 Inst coolstuff (3 experimental [amd64])
60 Conf coolstuff (3 experimental [amd64])' aptget
install --solver apt coolstuff
-s -t experimental
62 testsuccessequal
'Reading package lists...
63 Building dependency tree...
64 Execute external solver...
65 The following packages will be REMOVED:
67 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
68 Remv somestuff [1]' aptget autoremove
--solver apt somestuff
-s
69 testsuccess aptmark auto cool stuff
70 testsuccessequal
'Reading package lists...
71 Building dependency tree...
72 Reading state information...
73 Execute external solver...
74 The following packages will be REMOVED:
76 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
79 Remv stuff [1]' aptget autoremove
--solver apt somestuff
-s
81 testsuccessequal
"Reading package lists...
82 Building dependency tree...
83 Reading state information...
84 Execute external solver...
85 The following package was automatically installed and is no longer required:
87 Use 'apt-get autoremove' to remove it.
88 The following packages will be REMOVED:
90 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
92 Purg cool [1]" aptget purge
--solver apt cool
-s
94 testsuccess aptget
install awesomecoolstuff
:i386
-s
95 testsuccess aptget
install --solver apt awesomecoolstuff
:i386
-s
97 rm -f "$APT_EDSP_DUMP_FILENAME"
98 testfailure aptget
install --solver dump awesomecoolstuff
:i386
-s
99 testsuccess
test -s "$APT_EDSP_DUMP_FILENAME"
100 testequal
'Install: awesomecoolstuff:i386' grep :i386
"$APT_EDSP_DUMP_FILENAME"
101 testempty
grep -e ':amd64' -e 'Architecture: any' "$APT_EDSP_DUMP_FILENAME"
103 testsuccess aptget dist
-upgrade -s
104 testsuccess aptget dist
-upgrade -s --solver apt
106 testsuccess aptget upgrade
-s
107 testsuccess aptget upgrade
-s --solver apt
109 testfailure aptget
install awesome badstuff
-s
110 testfailure aptget
install awesome badstuff
-s --solver apt
111 testsuccess
grep 'ERR_UNSOLVABLE' rootdir
/tmp
/testfailure.output
113 configarchitecture
'armel'
114 msgtest
'Test direct calling is okay for' 'apt-internal-solver'
115 cat "$APT_EDSP_DUMP_FILENAME" | aptinternalsolver
-q=0 > solver.result
2>&1 || true
116 if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then
122 rm -f "$APT_EDSP_DUMP_FILENAME"
124 testfailure aptget
install --solver apt awesomecoolstuff
:i386
-s
126 testsuccess aptinternalsolver scenario
127 testsuccessequal
'Package: stuff
138 ' aptinternalsolver scenario stuff