test-handling-broken-orgroups 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. insertpackage 'unstable' 'cool' 'all' '1.0-1'
  8. insertpackage 'unstable' 'stuff' 'all' '1.0-1'
  9. insertpackage 'unstable' 'coolstuff' 'all' '1.0-1' 'Depends: cool | stuff'
  10. insertpackage 'unstable' 'coolstuff2' 'all' '1.0-1' 'Depends: cool2 | stuff'
  11. insertpackage 'unstable' 'coolstuff-broken' 'all' '1.0-1' 'Depends: cool2 | stuff2'
  12. insertpackage 'unstable' 'coolstuff-brokenrec' 'all' '1.0-1' 'Recommends: cool2 | stuff2'
  13. insertpackage 'unstable' 'coolstuff-conflict' 'all' '1.0-1' 'Depends: cool | stuff
  14. Conflicts: cool'
  15. insertpackage 'unstable' 'coolstuff-provided' 'all' '1.0-1' 'Depends: cool2 | stuff-abi'
  16. insertpackage 'unstable' 'extrastuff' 'all' '1.0-1' 'Provides: stuff-abi'
  17. insertpackage 'unstable' 'coolstuff-provided-broken' 'all' '1.0-1' 'Depends: cool2 | stuff-abi-2'
  18. insertpackage 'unstable' 'extrastuff' 'all' '1.0-1' 'Depends: stuff2
  19. Provides: stuff-abi-2'
  20. setupaptarchive
  21. testsuccessequal 'Reading package lists...
  22. Building dependency tree...
  23. The following additional packages will be installed:
  24. cool
  25. The following NEW packages will be installed:
  26. cool coolstuff
  27. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  28. Inst cool (1.0-1 unstable [all])
  29. Inst coolstuff (1.0-1 unstable [all])
  30. Conf cool (1.0-1 unstable [all])
  31. Conf coolstuff (1.0-1 unstable [all])' aptget install coolstuff -s
  32. testsuccessequal 'Reading package lists...
  33. Building dependency tree...
  34. The following additional packages will be installed:
  35. stuff
  36. The following NEW packages will be installed:
  37. coolstuff2 stuff
  38. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  39. Inst stuff (1.0-1 unstable [all])
  40. Inst coolstuff2 (1.0-1 unstable [all])
  41. Conf stuff (1.0-1 unstable [all])
  42. Conf coolstuff2 (1.0-1 unstable [all])' aptget install coolstuff2 -s
  43. testfailureequal 'Reading package lists...
  44. Building dependency tree...
  45. Some packages could not be installed. This may mean that you have
  46. requested an impossible situation or if you are using the unstable
  47. distribution that some required packages have not yet been created
  48. or been moved out of Incoming.
  49. The following information may help to resolve the situation:
  50. The following packages have unmet dependencies:
  51. coolstuff-broken : Depends: cool2 but it is not installable or
  52. stuff2 but it is not installable
  53. E: Unable to correct problems, you have held broken packages.' aptget install coolstuff-broken -s
  54. testsuccessequal 'Reading package lists...
  55. Building dependency tree...
  56. Recommended packages:
  57. cool2 | stuff2
  58. The following NEW packages will be installed:
  59. coolstuff-brokenrec
  60. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  61. Inst coolstuff-brokenrec (1.0-1 unstable [all])
  62. Conf coolstuff-brokenrec (1.0-1 unstable [all])' aptget install coolstuff-brokenrec -s
  63. testsuccessequal 'Reading package lists...
  64. Building dependency tree...
  65. The following additional packages will be installed:
  66. stuff
  67. The following NEW packages will be installed:
  68. coolstuff-conflict stuff
  69. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  70. Inst stuff (1.0-1 unstable [all])
  71. Inst coolstuff-conflict (1.0-1 unstable [all])
  72. Conf stuff (1.0-1 unstable [all])
  73. Conf coolstuff-conflict (1.0-1 unstable [all])' aptget install coolstuff-conflict -s
  74. testsuccessequal 'Reading package lists...
  75. Building dependency tree...
  76. The following additional packages will be installed:
  77. extrastuff
  78. The following NEW packages will be installed:
  79. coolstuff-provided extrastuff
  80. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  81. Inst extrastuff (1.0-1 unstable [all])
  82. Inst coolstuff-provided (1.0-1 unstable [all])
  83. Conf extrastuff (1.0-1 unstable [all])
  84. Conf coolstuff-provided (1.0-1 unstable [all])' aptget install coolstuff-provided -s
  85. testfailureequal 'Reading package lists...
  86. Building dependency tree...
  87. Some packages could not be installed. This may mean that you have
  88. requested an impossible situation or if you are using the unstable
  89. distribution that some required packages have not yet been created
  90. or been moved out of Incoming.
  91. The following information may help to resolve the situation:
  92. The following packages have unmet dependencies:
  93. coolstuff-provided-broken : Depends: cool2 but it is not installable or
  94. stuff-abi-2
  95. E: Unable to correct problems, you have held broken packages.' aptget install coolstuff-provided-broken -s