test-bug-612099-multiarch-conflicts 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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. aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null
  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. The following packages will be upgraded:
  65. libc6
  66. 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  67. Inst libc6 [1.0] (2.0 testing [all])
  68. Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s
  69. # FIXME: on amd64 systems this test wouldn't run with a real upgrade
  70. # as APT (here i386) disagree about the native architecture, so
  71. # we fake it here:
  72. #aptget upgrade -y -qq 2>&1 > /dev/null
  73. aptget purge libc6 -y -qq 2>&1 >/dev/null
  74. aptget install libc6:i386 -y -qq 2>&1 >/dev/null
  75. testdpkginstalled libc6:all
  76. testequal 'Reading package lists...
  77. Building dependency tree...
  78. Reading state information...
  79. The following NEW packages will be installed:
  80. foobar
  81. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  82. Inst foobar (1.0 stable [i386])
  83. Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing
  84. testequal 'Reading package lists...
  85. Building dependency tree...
  86. Reading state information...
  87. The following extra packages will be installed:
  88. libc6:amd64
  89. The following packages will be REMOVED:
  90. libc6
  91. The following NEW packages will be installed:
  92. foobar:amd64 libc6:amd64
  93. 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
  94. Remv libc6 [2.0]
  95. Inst libc6:amd64 (1.0 stable [amd64])
  96. Inst foobar:amd64 (1.0 stable [amd64])
  97. Conf libc6:amd64 (1.0 stable [amd64])
  98. Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing
  99. testequal "Reading package lists...
  100. Building dependency tree...
  101. Reading state information...
  102. Selected version '1.0' (stable [i386]) for 'libc6'
  103. The following packages will be DOWNGRADED:
  104. libc6
  105. 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
  106. Inst libc6 [2.0] (1.0 stable [i386])
  107. Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0
  108. buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same'
  109. buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same'
  110. buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing'
  111. buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same'
  112. buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same'
  113. setupaptarchive
  114. aptget install libc6-same:i386 -t stable -y -qq 2>&1 > /dev/null
  115. testdpkginstalled libc6-same:i386
  116. testequal 'Reading package lists...
  117. Building dependency tree...
  118. Reading state information...
  119. The following NEW packages will be installed:
  120. foobar-same
  121. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  122. Inst foobar-same (1.0 stable [i386])
  123. Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable
  124. testequal 'Reading package lists...
  125. Building dependency tree...
  126. Reading state information...
  127. The following extra packages will be installed:
  128. libc6-same:amd64
  129. The following NEW packages will be installed:
  130. foobar-same:amd64 libc6-same:amd64
  131. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  132. Inst libc6-same:amd64 (1.0 stable [amd64])
  133. Inst foobar-same:amd64 (1.0 stable [amd64])
  134. Conf libc6-same:amd64 (1.0 stable [amd64])
  135. Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable
  136. testequal 'Reading package lists...
  137. Building dependency tree...
  138. Reading state information...
  139. The following NEW packages will be installed:
  140. libc6-same:amd64
  141. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  142. Inst libc6-same:amd64 (1.0 stable [amd64])
  143. Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable
  144. # FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently
  145. testequal 'Reading package lists...
  146. Building dependency tree...
  147. Reading state information...
  148. The following packages will be upgraded:
  149. libc6-same
  150. 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  151. Inst libc6-same [1.0] (2.0 testing [all])
  152. Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s
  153. # FIXME: on amd64 systems this test wouldn't run with a real upgrade
  154. # as APT (here i386) disagree about the native architecture, so
  155. # we fake it here:
  156. #aptget upgrade -y -qq 2>&1 > /dev/null
  157. aptget purge libc6-same -y -qq 2>&1 >/dev/null
  158. aptget install libc6-same:i386 -y -qq 2>&1 >/dev/null
  159. testdpkginstalled libc6-same:all
  160. testequal "Reading package lists...
  161. Building dependency tree...
  162. Reading state information...
  163. Selected version '1.0' (stable [i386]) for 'libc6-same'
  164. The following packages will be DOWNGRADED:
  165. libc6-same
  166. 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
  167. Inst libc6-same [2.0] (1.0 stable [i386])
  168. Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0
  169. testequal 'Reading package lists...
  170. Building dependency tree...
  171. Reading state information...
  172. The following NEW packages will be installed:
  173. foobar-same
  174. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  175. Inst foobar-same (1.0 stable [i386])
  176. Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing
  177. testequal 'Reading package lists...
  178. Building dependency tree...
  179. Reading state information...
  180. The following extra packages will be installed:
  181. libc6-same:amd64
  182. The following packages will be REMOVED:
  183. libc6-same
  184. The following NEW packages will be installed:
  185. foobar-same:amd64 libc6-same:amd64
  186. 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
  187. Remv libc6-same [2.0]
  188. Inst libc6-same:amd64 (1.0 stable [amd64])
  189. Inst foobar-same:amd64 (1.0 stable [amd64])
  190. Conf libc6-same:amd64 (1.0 stable [amd64])
  191. Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing