test-prefer-higher-priority-providers 3.7 KB

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