You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

226 lines
8.1 KiB

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