test-specific-architecture-dependencies 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64' 'i386'
  7. insertpackage 'unstable' 'libc6' 'amd64,i386' '1' 'Multi-Arch: same'
  8. insertinstalledpackage 'libold' 'amd64,i386' '1' 'Multi-Arch: same'
  9. insertinstalledpackage 'provider' 'amd64' '1' 'Provides: foo'
  10. insertpackage 'unstable' 'pre-depender' 'all' '1' 'Pre-Depends: libc6:i386'
  11. insertpackage 'unstable' 'depender' 'all' '1' 'Depends: libc6:i386'
  12. insertpackage 'unstable' 'depender-x32' 'i386,amd64' '1' 'Depends: libc6:i386'
  13. insertpackage 'unstable' 'depender-x64' 'i386,amd64' '1' 'Depends: libc6:amd64'
  14. insertpackage 'unstable' 'breaker' 'all' '1' 'Breaks: libold (<< 2)'
  15. insertpackage 'unstable' 'breaker-x32' 'i386,amd64' '1' 'Breaks: libold:i386 (<< 2)'
  16. insertpackage 'unstable' 'breaker-x64' 'i386,amd64' '1' 'Breaks: libold:amd64 (<< 2)'
  17. # conflicts with no effect
  18. insertpackage 'unstable' 'oldconflictor' 'all' '1' 'Conflicts: libold (<< 0)'
  19. insertpackage 'unstable' 'oldconflictor-x32' 'amd64' '1' 'Conflicts: libold:i386 (<< 0)'
  20. insertpackage 'unstable' 'oldconflictor-x64' 'i386' '1' 'Conflicts: libold:amd64 (<< 0)'
  21. insertpackage 'unstable' 'foo-depender' 'i386,amd64' '1' 'Depends: foo'
  22. insertpackage 'unstable' 'foo-native-depender' 'amd64' '1' 'Depends: foo:amd64'
  23. insertpackage 'unstable' 'foo-foreign-depender' 'i386' '1' 'Depends: foo:amd64'
  24. insertpackage 'unstable' 'foo-conflictor' 'i386,amd64' '1' 'Conflicts: foo'
  25. insertpackage 'unstable' 'foo-foreign-conflictor' 'i386' '1' 'Conflicts: foo:amd64'
  26. insertpackage 'unstable' 'foo-no-conflictor' 'i386' '1' 'Conflicts: foo:i386'
  27. setupaptarchive
  28. testsuccessequal 'Reading package lists...
  29. Building dependency tree...
  30. The following additional packages will be installed:
  31. libc6:i386
  32. The following NEW packages will be installed:
  33. libc6:i386 pre-depender
  34. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  35. Inst libc6:i386 (1 unstable [i386])
  36. Conf libc6:i386 (1 unstable [i386])
  37. Inst pre-depender (1 unstable [all])
  38. Conf pre-depender (1 unstable [all])' aptget install pre-depender -s
  39. testsuccessequal 'Reading package lists...
  40. Building dependency tree...
  41. The following additional packages will be installed:
  42. libc6:i386
  43. The following NEW packages will be installed:
  44. depender libc6:i386
  45. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  46. Inst libc6:i386 (1 unstable [i386])
  47. Inst depender (1 unstable [all])
  48. Conf libc6:i386 (1 unstable [i386])
  49. Conf depender (1 unstable [all])' aptget install depender -s
  50. testsuccessequal 'Reading package lists...
  51. Building dependency tree...
  52. The following additional packages will be installed:
  53. libc6:i386
  54. The following NEW packages will be installed:
  55. depender-x32:i386 libc6:i386
  56. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  57. Inst libc6:i386 (1 unstable [i386])
  58. Inst depender-x32:i386 (1 unstable [i386])
  59. Conf libc6:i386 (1 unstable [i386])
  60. Conf depender-x32:i386 (1 unstable [i386])' aptget install depender-x32:i386 -s
  61. testsuccessequal 'Reading package lists...
  62. Building dependency tree...
  63. The following additional packages will be installed:
  64. libc6:i386
  65. The following NEW packages will be installed:
  66. depender-x32 libc6:i386
  67. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  68. Inst libc6:i386 (1 unstable [i386])
  69. Inst depender-x32 (1 unstable [amd64])
  70. Conf libc6:i386 (1 unstable [i386])
  71. Conf depender-x32 (1 unstable [amd64])' aptget install depender-x32:amd64 -s
  72. testsuccessequal 'Reading package lists...
  73. Building dependency tree...
  74. The following additional packages will be installed:
  75. libc6
  76. The following NEW packages will be installed:
  77. depender-x64 libc6
  78. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  79. Inst libc6 (1 unstable [amd64])
  80. Inst depender-x64 (1 unstable [amd64])
  81. Conf libc6 (1 unstable [amd64])
  82. Conf depender-x64 (1 unstable [amd64])' aptget install depender-x64:amd64 -s
  83. testsuccessequal 'Reading package lists...
  84. Building dependency tree...
  85. The following additional packages will be installed:
  86. libc6
  87. The following NEW packages will be installed:
  88. depender-x64:i386 libc6
  89. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  90. Inst libc6 (1 unstable [amd64])
  91. Inst depender-x64:i386 (1 unstable [i386])
  92. Conf libc6 (1 unstable [amd64])
  93. Conf depender-x64:i386 (1 unstable [i386])' aptget install depender-x64:i386 -s
  94. testsuccessequal 'Reading package lists...
  95. Building dependency tree...
  96. The following packages will be REMOVED:
  97. libold:i386 libold
  98. The following NEW packages will be installed:
  99. breaker
  100. 0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
  101. Remv libold:i386 [1]
  102. Remv libold [1]
  103. Inst breaker (1 unstable [all])
  104. Conf breaker (1 unstable [all])' aptget install breaker -s
  105. testsuccessequal 'Reading package lists...
  106. Building dependency tree...
  107. The following packages will be REMOVED:
  108. libold:i386
  109. The following NEW packages will be installed:
  110. breaker-x32
  111. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  112. Remv libold:i386 [1]
  113. Inst breaker-x32 (1 unstable [amd64])
  114. Conf breaker-x32 (1 unstable [amd64])' aptget install breaker-x32:amd64 -s
  115. testsuccessequal 'Reading package lists...
  116. Building dependency tree...
  117. The following packages will be REMOVED:
  118. libold:i386
  119. The following NEW packages will be installed:
  120. breaker-x32:i386
  121. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  122. Remv libold:i386 [1]
  123. Inst breaker-x32:i386 (1 unstable [i386])
  124. Conf breaker-x32:i386 (1 unstable [i386])' aptget install breaker-x32:i386 -s
  125. testsuccessequal 'Reading package lists...
  126. Building dependency tree...
  127. The following packages will be REMOVED:
  128. libold
  129. The following NEW packages will be installed:
  130. breaker-x64
  131. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  132. Remv libold [1]
  133. Inst breaker-x64 (1 unstable [amd64])
  134. Conf breaker-x64 (1 unstable [amd64])' aptget install breaker-x64:amd64 -s
  135. testsuccessequal 'Reading package lists...
  136. Building dependency tree...
  137. The following packages will be REMOVED:
  138. libold
  139. The following NEW packages will be installed:
  140. breaker-x64:i386
  141. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  142. Remv libold [1]
  143. Inst breaker-x64:i386 (1 unstable [i386])
  144. Conf breaker-x64:i386 (1 unstable [i386])' aptget install breaker-x64:i386 -s
  145. testsuccessequal 'Reading package lists...
  146. Building dependency tree...
  147. The following NEW packages will be installed:
  148. oldconflictor
  149. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  150. Inst oldconflictor (1 unstable [all])
  151. Conf oldconflictor (1 unstable [all])' aptget install oldconflictor -s
  152. testsuccessequal 'Reading package lists...
  153. Building dependency tree...
  154. The following NEW packages will be installed:
  155. oldconflictor-x32
  156. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  157. Inst oldconflictor-x32 (1 unstable [amd64])
  158. Conf oldconflictor-x32 (1 unstable [amd64])' aptget install oldconflictor-x32 -s
  159. testsuccessequal 'Reading package lists...
  160. Building dependency tree...
  161. The following NEW packages will be installed:
  162. oldconflictor-x64:i386
  163. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  164. Inst oldconflictor-x64:i386 (1 unstable [i386])
  165. Conf oldconflictor-x64:i386 (1 unstable [i386])' aptget install oldconflictor-x64 -s
  166. testsuccessequal 'Reading package lists...
  167. Building dependency tree...
  168. The following NEW packages will be installed:
  169. foo-depender
  170. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  171. Inst foo-depender (1 unstable [amd64])
  172. Conf foo-depender (1 unstable [amd64])' aptget install foo-depender -s
  173. testfailureequal 'Reading package lists...
  174. Building dependency tree...
  175. Some packages could not be installed. This may mean that you have
  176. requested an impossible situation or if you are using the unstable
  177. distribution that some required packages have not yet been created
  178. or been moved out of Incoming.
  179. The following information may help to resolve the situation:
  180. The following packages have unmet dependencies:
  181. foo-depender:i386 : Depends: foo:i386 but it is not installable
  182. E: Unable to correct problems, you have held broken packages.' aptget install foo-depender:i386 -s
  183. testsuccessequal 'Reading package lists...
  184. Building dependency tree...
  185. The following NEW packages will be installed:
  186. foo-native-depender
  187. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  188. Inst foo-native-depender (1 unstable [amd64])
  189. Conf foo-native-depender (1 unstable [amd64])' aptget install foo-native-depender -s
  190. testsuccessequal 'Reading package lists...
  191. Building dependency tree...
  192. The following NEW packages will be installed:
  193. foo-foreign-depender:i386
  194. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  195. Inst foo-foreign-depender:i386 (1 unstable [i386])
  196. Conf foo-foreign-depender:i386 (1 unstable [i386])' aptget install foo-foreign-depender:i386 -s
  197. testsuccessequal 'Reading package lists...
  198. Building dependency tree...
  199. The following packages will be REMOVED:
  200. provider
  201. The following NEW packages will be installed:
  202. foo-conflictor
  203. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  204. Remv provider [1]
  205. Inst foo-conflictor (1 unstable [amd64])
  206. Conf foo-conflictor (1 unstable [amd64])' aptget install foo-conflictor -s
  207. testsuccessequal 'Reading package lists...
  208. Building dependency tree...
  209. The following packages will be REMOVED:
  210. provider
  211. The following NEW packages will be installed:
  212. foo-conflictor:i386
  213. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  214. Remv provider [1]
  215. Inst foo-conflictor:i386 (1 unstable [i386])
  216. Conf foo-conflictor:i386 (1 unstable [i386])' aptget install foo-conflictor:i386 -s
  217. testsuccessequal 'Reading package lists...
  218. Building dependency tree...
  219. The following packages will be REMOVED:
  220. provider
  221. The following NEW packages will be installed:
  222. foo-foreign-conflictor:i386
  223. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  224. Remv provider [1]
  225. Inst foo-foreign-conflictor:i386 (1 unstable [i386])
  226. Conf foo-foreign-conflictor:i386 (1 unstable [i386])' aptget install foo-foreign-conflictor:i386 -s
  227. testsuccessequal 'Reading package lists...
  228. Building dependency tree...
  229. The following NEW packages will be installed:
  230. foo-no-conflictor:i386
  231. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  232. Inst foo-no-conflictor:i386 (1 unstable [i386])
  233. Conf foo-no-conflictor:i386 (1 unstable [i386])' aptget install foo-no-conflictor:i386 -s
  234. msgmsg 'switch to single architecture'
  235. configarchitecture 'amd64'
  236. testsuccessequal 'Reading package lists...
  237. Building dependency tree...
  238. The following additional packages will be installed:
  239. libc6
  240. The following NEW packages will be installed:
  241. depender-x64 libc6
  242. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  243. Inst libc6 (1 unstable [amd64])
  244. Inst depender-x64 (1 unstable [amd64])
  245. Conf libc6 (1 unstable [amd64])
  246. Conf depender-x64 (1 unstable [amd64])' aptget install depender-x64 -s
  247. testfailureequal 'Reading package lists...
  248. Building dependency tree...
  249. E: Unable to locate package depender-x64:i386' aptget install depender-x64:i386 -s
  250. testsuccessequal 'Reading package lists...
  251. Building dependency tree...
  252. The following NEW packages will be installed:
  253. foo-native-depender
  254. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  255. Inst foo-native-depender (1 unstable [amd64])
  256. Conf foo-native-depender (1 unstable [amd64])' aptget install foo-native-depender -s
  257. testsuccessequal 'Reading package lists...
  258. Building dependency tree...
  259. The following packages will be REMOVED:
  260. libold:i386
  261. The following NEW packages will be installed:
  262. breaker-x32
  263. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  264. Remv libold:i386 [1]
  265. Inst breaker-x32 (1 unstable [amd64])
  266. Conf breaker-x32 (1 unstable [amd64])' aptget install breaker-x32:amd64 -s
  267. testsuccessequal 'Reading package lists...
  268. Building dependency tree...
  269. The following packages will be REMOVED:
  270. libold
  271. The following NEW packages will be installed:
  272. breaker-x64
  273. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  274. Remv libold [1]
  275. Inst breaker-x64 (1 unstable [amd64])
  276. Conf breaker-x64 (1 unstable [amd64])' aptget install breaker-x64:amd64 -s
  277. testfailureequal 'Reading package lists...
  278. Building dependency tree...
  279. Some packages could not be installed. This may mean that you have
  280. requested an impossible situation or if you are using the unstable
  281. distribution that some required packages have not yet been created
  282. or been moved out of Incoming.
  283. The following information may help to resolve the situation:
  284. The following packages have unmet dependencies:
  285. depender-x32 : Depends: libc6:i386 but it is not installable
  286. E: Unable to correct problems, you have held broken packages.' aptget install depender-x32 -s