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.
 
 
 
 
 
 

201 lines
6.5 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. # simple case
  8. insertinstalledpackage 'aaa' 'all' '1'
  9. insertinstalledpackage 'ddd' 'all' '1'
  10. insertpackage 'unstable' 'aaa' 'all' '1'
  11. insertpackage 'unstable' 'ddd' 'all' '1'
  12. insertpackage 'unstable' 'yyy' 'all' '1'
  13. insertpackage 'unstable' 'zzz' 'all' '1:1'
  14. insertpackage 'unstable' 'simple' 'all' '1' 'Recommends: aaa, bbb
  15. Suggests: ccc, ddd'
  16. insertpackage 'unstable' 'orgroup' 'all' '1' 'Recommends: aaa | bbb
  17. Suggests: ccc | ddd'
  18. insertpackage 'unstable' 'orgroup2' 'all' '1' 'Recommends: xxx | yyy
  19. Suggests: yyy | zzz'
  20. insertpackage 'unstable' 'orgroup3' 'all' '1' 'Recommends: xxx | yyy
  21. Suggests: yyy | zzz'
  22. insertpackage 'unstable' 'orgroup4' 'all' '1' 'Recommends: xxx
  23. Suggests: zzz'
  24. insertpackage 'unstable' 'versionedor' 'all' '1' 'Recommends: aaa (>> 2) | bbb
  25. Suggests: ccc | ddd (>> 2)'
  26. setupaptarchive
  27. testsuccessequal 'Reading package lists...
  28. Building dependency tree...
  29. Suggested packages:
  30. ccc
  31. Recommended packages:
  32. bbb
  33. The following NEW packages will be installed:
  34. simple
  35. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  36. Inst simple (1 unstable [all])
  37. Conf simple (1 unstable [all])' aptget install simple -s --install-recommends --install-suggests
  38. testsuccessequal 'Reading package lists...
  39. Building dependency tree...
  40. Suggested packages:
  41. ccc
  42. Recommended packages:
  43. bbb
  44. The following NEW packages will be installed:
  45. simple
  46. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  47. Inst simple (1 unstable [all])
  48. Conf simple (1 unstable [all])' aptget install simple -s --no-install-recommends
  49. testsuccessequal 'Reading package lists...
  50. Building dependency tree...
  51. Suggested packages:
  52. ccc
  53. Recommended packages:
  54. aaa bbb
  55. The following packages will be REMOVED:
  56. aaa
  57. The following NEW packages will be installed:
  58. simple
  59. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  60. Remv aaa [1]
  61. Inst simple (1 unstable [all])
  62. Conf simple (1 unstable [all])' aptget install simple aaa- -s --no-install-recommends
  63. testsuccessequal 'Reading package lists...
  64. Building dependency tree...
  65. The following NEW packages will be installed:
  66. orgroup
  67. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  68. Inst orgroup (1 unstable [all])
  69. Conf orgroup (1 unstable [all])' aptget install orgroup -s --no-install-recommends
  70. testsuccessequal 'Reading package lists...
  71. Building dependency tree...
  72. Recommended packages:
  73. aaa | bbb
  74. The following packages will be REMOVED:
  75. aaa
  76. The following NEW packages will be installed:
  77. orgroup
  78. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  79. Remv aaa [1]
  80. Inst orgroup (1 unstable [all])
  81. Conf orgroup (1 unstable [all])' aptget install orgroup aaa- -s --no-install-recommends
  82. testsuccessequal 'Reading package lists...
  83. Building dependency tree...
  84. Suggested packages:
  85. yyy | zzz
  86. Recommended packages:
  87. xxx | yyy
  88. The following NEW packages will be installed:
  89. orgroup2
  90. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  91. Inst orgroup2 (1 unstable [all])
  92. Conf orgroup2 (1 unstable [all])' aptget install orgroup2 -s --no-install-recommends
  93. testsuccessequal 'Reading package lists...
  94. Building dependency tree...
  95. Suggested packages:
  96. yyy | zzz
  97. Recommended packages:
  98. xxx | yyy
  99. The following NEW packages will be installed:
  100. orgroup2 orgroup3
  101. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  102. Inst orgroup2 (1 unstable [all])
  103. Inst orgroup3 (1 unstable [all])
  104. Conf orgroup2 (1 unstable [all])
  105. Conf orgroup3 (1 unstable [all])' aptget install orgroup2 orgroup3 -s --no-install-recommends
  106. testsuccessequal 'Reading package lists...
  107. Building dependency tree...
  108. Suggested packages:
  109. yyy | zzz zzz
  110. Recommended packages:
  111. xxx | yyy xxx
  112. The following NEW packages will be installed:
  113. orgroup2 orgroup4
  114. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  115. Inst orgroup2 (1 unstable [all])
  116. Inst orgroup4 (1 unstable [all])
  117. Conf orgroup2 (1 unstable [all])
  118. Conf orgroup4 (1 unstable [all])' aptget install orgroup2 orgroup4 -s --no-install-recommends
  119. testsuccessequal 'Reading package lists...
  120. Building dependency tree...
  121. Suggested packages:
  122. yyy (1)
  123. | zzz (1)
  124. zzz (1)
  125. Recommended packages:
  126. xxx
  127. | yyy (1)
  128. xxx
  129. The following NEW packages will be installed:
  130. orgroup2 (1)
  131. orgroup4 (1)
  132. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  133. Inst orgroup2 (1 unstable [all])
  134. Inst orgroup4 (1 unstable [all])
  135. Conf orgroup2 (1 unstable [all])
  136. Conf orgroup4 (1 unstable [all])' aptget install orgroup2 orgroup4 -s -V --no-install-recommends
  137. testsuccessequal 'Reading package lists...
  138. Building dependency tree...
  139. Suggested packages:
  140. zzz (1)
  141. Recommended packages:
  142. xxx
  143. The following NEW packages will be installed:
  144. orgroup2 (1)
  145. orgroup4 (1)
  146. yyy (1)
  147. 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  148. Inst orgroup2 (1 unstable [all])
  149. Inst orgroup4 (1 unstable [all])
  150. Inst yyy (1 unstable [all])
  151. Conf orgroup2 (1 unstable [all])
  152. Conf orgroup4 (1 unstable [all])
  153. Conf yyy (1 unstable [all])' aptget install orgroup2 orgroup4 yyy -s -V --no-install-recommends
  154. testsuccessequal 'Reading package lists...
  155. Building dependency tree...
  156. Suggested packages:
  157. ccc | ddd
  158. Recommended packages:
  159. aaa | bbb
  160. The following NEW packages will be installed:
  161. versionedor
  162. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  163. Inst versionedor (1 unstable [all])
  164. Conf versionedor (1 unstable [all])' aptget install versionedor -s --no-install-recommends
  165. SHOWSUGGEST='Reading package lists...
  166. Building dependency tree...
  167. Suggested packages:
  168. zzz
  169. Recommended packages:
  170. xxx
  171. The following NEW packages will be installed:
  172. orgroup4
  173. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  174. Inst orgroup4 (1 unstable [all])
  175. Conf orgroup4 (1 unstable [all])'
  176. INSTSUGGEST='Reading package lists...
  177. Building dependency tree...
  178. The following additional packages will be installed:
  179. zzz
  180. Recommended packages:
  181. xxx
  182. The following NEW packages will be installed:
  183. orgroup4 zzz
  184. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  185. Inst orgroup4 (1 unstable [all])
  186. Inst zzz (1:1 unstable [all])
  187. Conf orgroup4 (1 unstable [all])
  188. Conf zzz (1:1 unstable [all])'
  189. testsuccessequal "$SHOWSUGGEST" aptget install orgroup4 -s
  190. testsuccessequal "$INSTSUGGEST" aptget install orgroup4 --install-suggests -s
  191. echo 'Binary::apt-get::APT::Install-Suggests "true";' > rootdir/etc/apt/apt.conf.d/99binaryspecific.conf
  192. testsuccessequal "$INSTSUGGEST" aptget install orgroup4 -s
  193. testsuccessequal "$SHOWSUGGEST" apt install orgroup4 -s
  194. testsuccessequal "$SHOWSUGGEST" aptget install orgroup4 -s --no-install-suggests