test-bug-612099-multiarch-conflicts 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'i386' 'amd64'
  7. buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable'
  8. buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable'
  9. buildsimplenativepackage 'libc6' 'all' '2.0' 'testing'
  10. buildsimplenativepackage 'foobar' 'i386' '1.0' 'stable' 'Depends: libc6'
  11. buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6'
  12. setupaptarchive
  13. testsuccess aptget install libc6:i386 -t stable -y
  14. testdpkginstalled libc6:i386
  15. testequal 'Reading package lists...
  16. Building dependency tree...
  17. Reading state information...
  18. The following packages will be REMOVED:
  19. libc6
  20. The following NEW packages will be installed:
  21. libc6:amd64
  22. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  23. Remv libc6 [1.0]
  24. Inst libc6:amd64 (1.0 stable [amd64])
  25. Conf libc6:amd64 (1.0 stable [amd64])' aptget install libc6:amd64 -s -t stable
  26. testequal 'Reading package lists...
  27. Building dependency tree...
  28. Reading state information...
  29. The following NEW packages will be installed:
  30. foobar
  31. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  32. Inst foobar (1.0 stable [i386])
  33. Conf foobar (1.0 stable [i386])' aptget install foobar -st stable
  34. testequal 'Reading package lists...
  35. Building dependency tree...
  36. Reading state information...
  37. The following extra packages will be installed:
  38. libc6:amd64
  39. The following packages will be REMOVED:
  40. libc6
  41. The following NEW packages will be installed:
  42. foobar:amd64 libc6:amd64
  43. 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
  44. Remv libc6 [1.0]
  45. Inst libc6:amd64 (1.0 stable [amd64])
  46. Inst foobar:amd64 (1.0 stable [amd64])
  47. Conf libc6:amd64 (1.0 stable [amd64])
  48. Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable
  49. testequal 'Reading package lists...
  50. Building dependency tree...
  51. Reading state information...
  52. The following NEW packages will be installed:
  53. foobar
  54. The following packages will be upgraded:
  55. libc6
  56. 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  57. Inst libc6 [1.0] (2.0 testing [all])
  58. Inst foobar (1.0 stable [i386])
  59. Conf libc6 (2.0 testing [all])
  60. Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing
  61. testequal 'Reading package lists...
  62. Building dependency tree...
  63. Reading state information...
  64. Calculating upgrade...
  65. The following packages will be upgraded:
  66. libc6
  67. 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  68. Inst libc6 [1.0] (2.0 testing [all])
  69. Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s
  70. # FIXME: on amd64 systems this test wouldn't run with a real upgrade
  71. # as APT (here i386) disagree about the native architecture, so
  72. # we fake it here:
  73. #aptget upgrade -y -qq >/dev/null 2>&1
  74. testsuccess aptget purge libc6 -y
  75. testsuccess aptget install libc6:i386 -y
  76. testdpkginstalled libc6:all
  77. testequal 'Reading package lists...
  78. Building dependency tree...
  79. Reading state information...
  80. The following NEW packages will be installed:
  81. foobar
  82. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  83. Inst foobar (1.0 stable [i386])
  84. Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing
  85. testequal 'Reading package lists...
  86. Building dependency tree...
  87. Reading state information...
  88. The following extra packages will be installed:
  89. libc6:amd64
  90. The following packages will be REMOVED:
  91. libc6
  92. The following NEW packages will be installed:
  93. foobar:amd64 libc6:amd64
  94. 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
  95. Remv libc6 [2.0]
  96. Inst libc6:amd64 (1.0 stable [amd64])
  97. Inst foobar:amd64 (1.0 stable [amd64])
  98. Conf libc6:amd64 (1.0 stable [amd64])
  99. Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing
  100. testequal "Reading package lists...
  101. Building dependency tree...
  102. Reading state information...
  103. Selected version '1.0' (stable [i386]) for 'libc6'
  104. The following packages will be DOWNGRADED:
  105. libc6
  106. 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
  107. Inst libc6 [2.0] (1.0 stable [i386])
  108. Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0
  109. buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same'
  110. buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same'
  111. buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing'
  112. buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same'
  113. buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same'
  114. setupaptarchive
  115. testsuccess aptget install libc6-same:i386 -t stable -y
  116. testdpkginstalled libc6-same:i386
  117. testequal 'Reading package lists...
  118. Building dependency tree...
  119. Reading state information...
  120. The following NEW packages will be installed:
  121. foobar-same
  122. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  123. Inst foobar-same (1.0 stable [i386])
  124. Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable
  125. testequal 'Reading package lists...
  126. Building dependency tree...
  127. Reading state information...
  128. The following extra packages will be installed:
  129. libc6-same:amd64
  130. The following NEW packages will be installed:
  131. foobar-same:amd64 libc6-same:amd64
  132. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  133. Inst libc6-same:amd64 (1.0 stable [amd64])
  134. Inst foobar-same:amd64 (1.0 stable [amd64])
  135. Conf libc6-same:amd64 (1.0 stable [amd64])
  136. Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable
  137. testequal 'Reading package lists...
  138. Building dependency tree...
  139. Reading state information...
  140. The following NEW packages will be installed:
  141. libc6-same:amd64
  142. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  143. Inst libc6-same:amd64 (1.0 stable [amd64])
  144. Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable
  145. # FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently
  146. testequal 'Reading package lists...
  147. Building dependency tree...
  148. Reading state information...
  149. Calculating upgrade...
  150. The following packages will be upgraded:
  151. libc6-same
  152. 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  153. Inst libc6-same [1.0] (2.0 testing [all])
  154. Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s
  155. # FIXME: on amd64 systems this test wouldn't run with a real upgrade
  156. # as APT (here i386) disagree about the native architecture, so
  157. # we fake it here:
  158. #aptget upgrade -y -qq >/dev/null 2>&1
  159. testsuccess aptget purge libc6-same -y
  160. testsuccess aptget install libc6-same:i386 -y
  161. testdpkginstalled libc6-same:all
  162. testequal "Reading package lists...
  163. Building dependency tree...
  164. Reading state information...
  165. Selected version '1.0' (stable [i386]) for 'libc6-same'
  166. The following packages will be DOWNGRADED:
  167. libc6-same
  168. 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
  169. Inst libc6-same [2.0] (1.0 stable [i386])
  170. Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0
  171. testequal 'Reading package lists...
  172. Building dependency tree...
  173. Reading state information...
  174. The following NEW packages will be installed:
  175. foobar-same
  176. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  177. Inst foobar-same (1.0 stable [i386])
  178. Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing
  179. testequal 'Reading package lists...
  180. Building dependency tree...
  181. Reading state information...
  182. The following extra packages will be installed:
  183. libc6-same:amd64
  184. The following packages will be REMOVED:
  185. libc6-same
  186. The following NEW packages will be installed:
  187. foobar-same:amd64 libc6-same:amd64
  188. 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
  189. Remv libc6-same [2.0]
  190. Inst libc6-same:amd64 (1.0 stable [amd64])
  191. Inst foobar-same:amd64 (1.0 stable [amd64])
  192. Conf libc6-same:amd64 (1.0 stable [amd64])
  193. Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing