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.
 
 
 
 
 
 

175 lines
6.6 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. insertinstalledpackage 'cool' 'all' '1'
  8. insertinstalledpackage 'stuff' 'all' '1'
  9. insertinstalledpackage 'coolstuff' 'all' '1'
  10. insertpackage 'unstable' 'cool' 'all' '2'
  11. insertpackage 'unstable' 'stuff' 'all' '2'
  12. insertpackage 'unstable' 'coolstuff' 'all' '2'
  13. insertpackage 'unstable' 'super' 'all' '2'
  14. insertinstalledpackage 'tighten-cool' 'all' '1' 'Recommends: cool (>= 1)'
  15. insertpackage 'unstable' 'tighten-cool' 'all' '2' 'Recommends: cool (>= 2)'
  16. insertinstalledpackage 'tighten-coolorstuff' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 1)'
  17. insertpackage 'unstable' 'tighten-coolorstuff' 'all' '2' 'Recommends: stuff (>= 2) | cool (>= 2)'
  18. insertinstalledpackage 'tighten-coolorstuff2' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 1)'
  19. insertpackage 'unstable' 'tighten-coolorstuff2' 'all' '2' 'Recommends: stuff2 (>= 2) | cool (>= 2)'
  20. insertinstalledpackage 'newrec-cool' 'all' '1'
  21. insertpackage 'unstable' 'newrec-cool' 'all' '2' 'Recommends: cool (>= 2)'
  22. insertinstalledpackage 'newrec-super' 'all' '1'
  23. insertpackage 'unstable' 'newrec-super' 'all' '2' 'Recommends: super'
  24. insertinstalledpackage 'newrec-coolorstuff' 'all' '1'
  25. insertpackage 'unstable' 'newrec-coolorstuff' 'all' '2' 'Recommends: cool (>= 2) | stuff (>= 2)'
  26. insertinstalledpackage 'cool-gone' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 2)'
  27. insertpackage 'unstable' 'cool-gone' 'all' '2' 'Recommends: stuff (>= 2)'
  28. insertinstalledpackage 'super-overtake' 'all' '1' 'Recommends: cool | super, stuff | super'
  29. insertpackage 'unstable' 'super-overtake' 'all' '2' 'Recommends: stuff (>= 3) | super, super | cool (>= 2)'
  30. insertinstalledpackage 'upgrade-over-new' 'all' '1' 'Recommends: cool'
  31. insertpackage 'unstable' 'upgrade-over-new' 'all' '2' 'Recommends: cool (>= 2) | super'
  32. insertinstalledpackage 'now-satisfiable' 'all' '1' 'Recommends: cool (>= 3)'
  33. insertpackage 'unstable' 'now-satisfiable' 'all' '2' 'Recommends: cool (>= 2)'
  34. setupaptarchive
  35. testsuccessequal 'Reading package lists...
  36. Building dependency tree...
  37. The following additional packages will be installed:
  38. cool
  39. The following packages will be upgraded:
  40. cool tighten-cool
  41. 2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  42. Inst cool [1] (2 unstable [all])
  43. Inst tighten-cool [1] (2 unstable [all])
  44. Conf cool (2 unstable [all])
  45. Conf tighten-cool (2 unstable [all])' aptget install tighten-cool -s
  46. testsuccessequal 'Reading package lists...
  47. Building dependency tree...
  48. The following additional packages will be installed:
  49. stuff
  50. The following packages will be upgraded:
  51. stuff tighten-coolorstuff
  52. 2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  53. Inst stuff [1] (2 unstable [all])
  54. Inst tighten-coolorstuff [1] (2 unstable [all])
  55. Conf stuff (2 unstable [all])
  56. Conf tighten-coolorstuff (2 unstable [all])' aptget install tighten-coolorstuff -s
  57. testsuccessequal 'Reading package lists...
  58. Building dependency tree...
  59. The following additional packages will be installed:
  60. cool
  61. The following packages will be upgraded:
  62. cool tighten-coolorstuff2
  63. 2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  64. Inst cool [1] (2 unstable [all])
  65. Inst tighten-coolorstuff2 [1] (2 unstable [all])
  66. Conf cool (2 unstable [all])
  67. Conf tighten-coolorstuff2 (2 unstable [all])' aptget install tighten-coolorstuff2 -s
  68. testsuccessequal 'Reading package lists...
  69. Building dependency tree...
  70. The following additional packages will be installed:
  71. cool
  72. The following packages will be upgraded:
  73. cool newrec-cool
  74. 2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  75. Inst cool [1] (2 unstable [all])
  76. Inst newrec-cool [1] (2 unstable [all])
  77. Conf cool (2 unstable [all])
  78. Conf newrec-cool (2 unstable [all])' aptget install newrec-cool -s
  79. testsuccessequal 'Reading package lists...
  80. Building dependency tree...
  81. The following additional packages will be installed:
  82. super
  83. The following NEW packages will be installed:
  84. super
  85. The following packages will be upgraded:
  86. newrec-super
  87. 1 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
  88. Inst newrec-super [1] (2 unstable [all])
  89. Inst super (2 unstable [all])
  90. Conf newrec-super (2 unstable [all])
  91. Conf super (2 unstable [all])' aptget install newrec-super -s
  92. testsuccessequal 'Reading package lists...
  93. Building dependency tree...
  94. The following additional packages will be installed:
  95. cool
  96. The following packages will be upgraded:
  97. cool newrec-coolorstuff
  98. 2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  99. Inst cool [1] (2 unstable [all])
  100. Inst newrec-coolorstuff [1] (2 unstable [all])
  101. Conf cool (2 unstable [all])
  102. Conf newrec-coolorstuff (2 unstable [all])' aptget install newrec-coolorstuff -s
  103. testsuccessequal 'Reading package lists...
  104. Building dependency tree...
  105. The following additional packages will be installed:
  106. stuff
  107. The following packages will be upgraded:
  108. cool-gone stuff
  109. 2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  110. Inst cool-gone [1] (2 unstable [all])
  111. Inst stuff [1] (2 unstable [all])
  112. Conf cool-gone (2 unstable [all])
  113. Conf stuff (2 unstable [all])' aptget install cool-gone -s
  114. testsuccessequal 'Reading package lists...
  115. Building dependency tree...
  116. The following additional packages will be installed:
  117. super
  118. The following NEW packages will be installed:
  119. super
  120. The following packages will be upgraded:
  121. super-overtake
  122. 1 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
  123. Inst super (2 unstable [all])
  124. Inst super-overtake [1] (2 unstable [all])
  125. Conf super (2 unstable [all])
  126. Conf super-overtake (2 unstable [all])' aptget install super-overtake -s
  127. # if super would be in front, we would get a new here as it is new and
  128. # the first option in an or-group should be the preferred oneā€¦
  129. testsuccessequal 'Reading package lists...
  130. Building dependency tree...
  131. The following additional packages will be installed:
  132. cool
  133. The following packages will be upgraded:
  134. cool upgrade-over-new
  135. 2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  136. Inst cool [1] (2 unstable [all])
  137. Inst upgrade-over-new [1] (2 unstable [all])
  138. Conf cool (2 unstable [all])
  139. Conf upgrade-over-new (2 unstable [all])' aptget install upgrade-over-new -s
  140. # the recommends wasn't used before so while we could do it now,
  141. # the user doesn't seem to need it so avoid upgrading it
  142. testsuccessequal 'Reading package lists...
  143. Building dependency tree...
  144. Recommended packages:
  145. cool
  146. The following packages will be upgraded:
  147. now-satisfiable
  148. 1 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
  149. Inst now-satisfiable [1] (2 unstable [all])
  150. Conf now-satisfiable (2 unstable [all])' aptget install now-satisfiable -s