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.
 
 
 
 
 
 

151 lines
6.7 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386' 'amd64'
  7. insertpackage 'unstable' 'unrlated' 'all' '1.0'
  8. insertinstalledpackage 'foo' 'i386' '2.0'
  9. insertpackage 'unstable' 'foo' 'i386' '4.0'
  10. insertpackage 'unstable' 'foo-provider' 'i386' '1.0' 'Provides: foo'
  11. insertpackage 'unstable' 'foo-breaker-3' 'i386' '1.0' 'Breaks: foo (<< 3.0)'
  12. insertpackage 'unstable' 'foo-breaker-2' 'i386' '1.0' 'Breaks: foo (<< 2.0)'
  13. insertpackage 'unstable' 'foo-breaker-none' 'i386' '1.0' 'Breaks: foo'
  14. insertinstalledpackage 'foo-foreign' 'amd64' '2.0' 'Multi-Arch: foreign'
  15. insertpackage 'unstable' 'foo-foreign' 'amd64' '4.0' 'Multi-Arch: foreign'
  16. insertpackage 'unstable' 'foo-foreign-provider' 'i386' '1.0' 'Provides: foo-foreign'
  17. insertpackage 'unstable' 'foo-foreign-breaker-3' 'i386' '1.0' 'Breaks: foo-foreign (<< 3.0)'
  18. insertpackage 'unstable' 'foo-foreign-breaker-2' 'i386' '1.0' 'Breaks: foo-foreign (<< 2.0)'
  19. insertpackage 'unstable' 'foo-foreign-breaker-none' 'i386' '1.0' 'Breaks: foo-foreign'
  20. insertinstalledpackage 'foo-same' 'i386,amd64' '2.0' 'Multi-Arch: same'
  21. insertpackage 'unstable' 'foo-same' 'i386,amd64' '4.0' 'Multi-Arch: same'
  22. insertpackage 'unstable' 'foo-same-provider' 'i386' '1.0' 'Provides: foo-same'
  23. insertpackage 'unstable' 'foo-same-breaker-3' 'i386' '1.0' 'Breaks: foo-same (<< 3.0)'
  24. insertpackage 'unstable' 'foo-same-breaker-2' 'i386' '1.0' 'Breaks: foo-same (<< 2.0)'
  25. insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Breaks: foo-same'
  26. setupaptarchive
  27. testfailureequal 'Reading package lists...
  28. Building dependency tree...
  29. Some packages could not be installed. This may mean that you have
  30. requested an impossible situation or if you are using the unstable
  31. distribution that some required packages have not yet been created
  32. or been moved out of Incoming.
  33. The following information may help to resolve the situation:
  34. The following packages have unmet dependencies:
  35. foo-breaker-none : Breaks: foo
  36. E: Unable to correct problems, you have held broken packages.' aptget install foo-provider foo-breaker-none -s
  37. testsuccessequal 'Reading package lists...
  38. Building dependency tree...
  39. The following NEW packages will be installed:
  40. foo-breaker-2 foo-provider
  41. 0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
  42. Inst foo-breaker-2 (1.0 unstable [i386])
  43. Inst foo-provider (1.0 unstable [i386])
  44. Conf foo-breaker-2 (1.0 unstable [i386])
  45. Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-2 -s
  46. testsuccessequal 'Reading package lists...
  47. Building dependency tree...
  48. The following additional packages will be installed:
  49. foo
  50. The following NEW packages will be installed:
  51. foo-breaker-3 foo-provider
  52. The following packages will be upgraded:
  53. foo
  54. 1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
  55. Inst foo [2.0] (4.0 unstable [i386])
  56. Inst foo-breaker-3 (1.0 unstable [i386])
  57. Inst foo-provider (1.0 unstable [i386])
  58. Conf foo (4.0 unstable [i386])
  59. Conf foo-breaker-3 (1.0 unstable [i386])
  60. Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-3 -s
  61. testfailureequal 'Reading package lists...
  62. Building dependency tree...
  63. Some packages could not be installed. This may mean that you have
  64. requested an impossible situation or if you are using the unstable
  65. distribution that some required packages have not yet been created
  66. or been moved out of Incoming.
  67. The following information may help to resolve the situation:
  68. The following packages have unmet dependencies:
  69. foo-foreign-breaker-none : Breaks: foo-foreign
  70. E: Unable to correct problems, you have held broken packages.' aptget install foo-foreign-provider foo-foreign-breaker-none -s
  71. testsuccessequal 'Reading package lists...
  72. Building dependency tree...
  73. The following NEW packages will be installed:
  74. foo-foreign-breaker-2 foo-foreign-provider
  75. 0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
  76. Inst foo-foreign-breaker-2 (1.0 unstable [i386])
  77. Inst foo-foreign-provider (1.0 unstable [i386])
  78. Conf foo-foreign-breaker-2 (1.0 unstable [i386])
  79. Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-2 -s
  80. testsuccessequal 'Reading package lists...
  81. Building dependency tree...
  82. The following additional packages will be installed:
  83. foo-foreign:amd64
  84. The following NEW packages will be installed:
  85. foo-foreign-breaker-3 foo-foreign-provider
  86. The following packages will be upgraded:
  87. foo-foreign:amd64
  88. 1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
  89. Inst foo-foreign:amd64 [2.0] (4.0 unstable [amd64])
  90. Inst foo-foreign-breaker-3 (1.0 unstable [i386])
  91. Inst foo-foreign-provider (1.0 unstable [i386])
  92. Conf foo-foreign:amd64 (4.0 unstable [amd64])
  93. Conf foo-foreign-breaker-3 (1.0 unstable [i386])
  94. Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-3 -s
  95. testfailureequal 'Reading package lists...
  96. Building dependency tree...
  97. Some packages could not be installed. This may mean that you have
  98. requested an impossible situation or if you are using the unstable
  99. distribution that some required packages have not yet been created
  100. or been moved out of Incoming.
  101. The following information may help to resolve the situation:
  102. The following packages have unmet dependencies:
  103. foo-same-breaker-none : Breaks: foo-same
  104. E: Unable to correct problems, you have held broken packages.' aptget install foo-same-provider foo-same-breaker-none -s
  105. testsuccessequal 'Reading package lists...
  106. Building dependency tree...
  107. The following NEW packages will be installed:
  108. foo-same-breaker-2 foo-same-provider
  109. 0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
  110. Inst foo-same-breaker-2 (1.0 unstable [i386])
  111. Inst foo-same-provider (1.0 unstable [i386])
  112. Conf foo-same-breaker-2 (1.0 unstable [i386])
  113. Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-2 -s
  114. testsuccessequal 'Reading package lists...
  115. Building dependency tree...
  116. The following additional packages will be installed:
  117. foo-same foo-same:amd64
  118. The following NEW packages will be installed:
  119. foo-same-breaker-3 foo-same-provider
  120. The following packages will be upgraded:
  121. foo-same foo-same:amd64
  122. 2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
  123. Inst foo-same [2.0] (4.0 unstable [i386]) [foo-same:i386 on foo-same:amd64] [foo-same:amd64 on foo-same:i386] [foo-same:amd64 ]
  124. Inst foo-same:amd64 [2.0] (4.0 unstable [amd64])
  125. Inst foo-same-breaker-3 (1.0 unstable [i386])
  126. Inst foo-same-provider (1.0 unstable [i386])
  127. Conf foo-same (4.0 unstable [i386])
  128. Conf foo-same:amd64 (4.0 unstable [amd64])
  129. Conf foo-same-breaker-3 (1.0 unstable [i386])
  130. Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s