test-prevent-markinstall-multiarch-same-versionscrew 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64' 'i386' 'armel'
  7. insertpackage 'stable' 'allarchs' 'all' '1'
  8. insertpackage 'unstable' 'allarchs' 'all' '2'
  9. insertpackage 'stable,installed' 'fine' 'i386,amd64' '1' 'Multi-Arch: same'
  10. insertpackage 'unstable' 'fine' 'amd64,i386' '2' 'Multi-Arch: same'
  11. insertpackage 'experimental' 'fine' 'amd64,i386' '3' 'Multi-Arch: same'
  12. insertinstalledpackage 'fine-installed' 'i386,amd64' '1' 'Multi-Arch: same'
  13. insertpackage 'stable' 'fine-installed' 'i386,amd64,armel' '1' 'Multi-Arch: same'
  14. insertpackage 'unstable' 'fine-installed' 'i386,amd64' '2' 'Multi-Arch: same'
  15. insertpackage 'experimental' 'fine-installed' 'i386,amd64' '3' 'Multi-Arch: same'
  16. insertpackage 'stable,installed' 'out-of-sync-native' 'i386,amd64' '1' 'Multi-Arch: same'
  17. insertpackage 'unstable' 'out-of-sync-native' 'amd64' '2' 'Multi-Arch: same'
  18. insertpackage 'stable,installed' 'out-of-sync-foreign' 'i386,amd64' '1' 'Multi-Arch: same'
  19. insertpackage 'unstable' 'out-of-sync-foreign' 'i386' '2' 'Multi-Arch: same'
  20. insertinstalledpackage 'out-of-sync-gone-native' 'i386,amd64' '1' 'Multi-Arch: same'
  21. insertpackage 'stable' 'out-of-sync-gone-native' 'i386' '1' 'Multi-Arch: same'
  22. insertpackage 'unstable' 'out-of-sync-gone-native' 'i386' '2' 'Multi-Arch: same'
  23. insertinstalledpackage 'out-of-sync-gone-foreign' 'i386,amd64' '1' 'Multi-Arch: same'
  24. insertpackage 'stable' 'out-of-sync-gone-foreign' 'amd64' '1' 'Multi-Arch: same'
  25. insertpackage 'unstable' 'out-of-sync-gone-foreign' 'amd64' '2' 'Multi-Arch: same'
  26. insertpackage 'stable' 'libsame2' 'i386' '1' 'Multi-Arch: same'
  27. insertpackage 'unstable' 'libsame2' 'amd64' '2' 'Multi-Arch: same'
  28. insertpackage 'unstable' 'depender2' 'all' '2' 'Depends: libsame2 (= 2)'
  29. insertpackage 'stable' 'libsame3' 'i386' '1' 'Multi-Arch: same'
  30. insertpackage 'unstable' 'libsame3' 'i386,amd64' '3' 'Multi-Arch: same'
  31. insertpackage 'unstable' 'depender3' 'all' '3' 'Depends: libsame3 (= 3)'
  32. setupaptarchive
  33. testsuccessequal 'Reading package lists...
  34. Building dependency tree...
  35. Calculating upgrade...
  36. The following packages will be REMOVED:
  37. out-of-sync-gone-foreign:i386 out-of-sync-gone-native
  38. The following packages have been kept back:
  39. out-of-sync-foreign:i386 out-of-sync-native
  40. The following packages will be upgraded:
  41. fine fine:i386 fine-installed fine-installed:i386 out-of-sync-gone-foreign
  42. out-of-sync-gone-native:i386
  43. 6 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
  44. Remv out-of-sync-gone-foreign:i386 [1]
  45. Remv out-of-sync-gone-native [1]
  46. Inst fine [1] (2 unstable [amd64]) [fine:amd64 on fine:i386] [fine:i386 on fine:amd64] [fine:i386 ]
  47. Inst fine:i386 [1] (2 unstable [i386])
  48. Inst fine-installed [1] (2 unstable [amd64]) [fine-installed:amd64 on fine-installed:i386] [fine-installed:i386 on fine-installed:amd64] [fine-installed:i386 ]
  49. Inst fine-installed:i386 [1] (2 unstable [i386])
  50. Inst out-of-sync-gone-foreign [1] (2 unstable [amd64])
  51. Inst out-of-sync-gone-native:i386 [1] (2 unstable [i386])
  52. Conf fine (2 unstable [amd64])
  53. Conf fine:i386 (2 unstable [i386])
  54. Conf fine-installed (2 unstable [amd64])
  55. Conf fine-installed:i386 (2 unstable [i386])
  56. Conf out-of-sync-gone-foreign (2 unstable [amd64])
  57. Conf out-of-sync-gone-native:i386 (2 unstable [i386])' aptget dist-upgrade -s #-o Debug::pkgDepCache::Marker=1
  58. echo 'Package: fine:* fine-installed:*
  59. Pin: release a=experimental
  60. Pin-Priority: 500' > rootdir/etc/apt/preferences.d/experimental.pref
  61. testsuccessequal 'Reading package lists...
  62. Building dependency tree...
  63. Calculating upgrade...
  64. The following packages will be REMOVED:
  65. out-of-sync-gone-foreign:i386 out-of-sync-gone-native
  66. The following packages have been kept back:
  67. out-of-sync-foreign:i386 out-of-sync-native
  68. The following packages will be upgraded:
  69. fine fine:i386 fine-installed fine-installed:i386 out-of-sync-gone-foreign
  70. out-of-sync-gone-native:i386
  71. 6 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
  72. Remv out-of-sync-gone-foreign:i386 [1]
  73. Remv out-of-sync-gone-native [1]
  74. Inst fine [1] (3 experimental [amd64]) [fine:amd64 on fine:i386] [fine:i386 on fine:amd64] [fine:i386 ]
  75. Inst fine:i386 [1] (3 experimental [i386])
  76. Inst fine-installed [1] (3 experimental [amd64]) [fine-installed:amd64 on fine-installed:i386] [fine-installed:i386 on fine-installed:amd64] [fine-installed:i386 ]
  77. Inst fine-installed:i386 [1] (3 experimental [i386])
  78. Inst out-of-sync-gone-foreign [1] (2 unstable [amd64])
  79. Inst out-of-sync-gone-native:i386 [1] (2 unstable [i386])
  80. Conf fine (3 experimental [amd64])
  81. Conf fine:i386 (3 experimental [i386])
  82. Conf fine-installed (3 experimental [amd64])
  83. Conf fine-installed:i386 (3 experimental [i386])
  84. Conf out-of-sync-gone-foreign (2 unstable [amd64])
  85. Conf out-of-sync-gone-native:i386 (2 unstable [i386])' aptget dist-upgrade -s #-o Debug::pkgDepCache::Marker=1
  86. rm rootdir/var/lib/dpkg/status
  87. insertinstalledpackage 'libsame2' 'i386' '1' 'Multi-Arch: same'
  88. insertinstalledpackage 'libsame3' 'i386' '1' 'Multi-Arch: same'
  89. # the error message isn't great, but better than nothing, right?
  90. testfailureequal 'Reading package lists...
  91. Building dependency tree...
  92. Some packages could not be installed. This may mean that you have
  93. requested an impossible situation or if you are using the unstable
  94. distribution that some required packages have not yet been created
  95. or been moved out of Incoming.
  96. The following information may help to resolve the situation:
  97. The following packages have unmet dependencies:
  98. depender2 : Depends: libsame2 (= 2) but it is not going to be installed
  99. E: Unable to correct problems, you have held broken packages.' aptget install depender2 -s
  100. testsuccessequal 'Reading package lists...
  101. Building dependency tree...
  102. The following additional packages will be installed:
  103. libsame3:i386 libsame3
  104. The following NEW packages will be installed:
  105. depender3 libsame3
  106. The following packages will be upgraded:
  107. libsame3:i386
  108. 1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  109. Inst libsame3:i386 [1] (3 unstable [i386])
  110. Inst libsame3 (3 unstable [amd64])
  111. Inst depender3 (3 unstable [all])
  112. Conf libsame3:i386 (3 unstable [i386])
  113. Conf libsame3 (3 unstable [amd64])
  114. Conf depender3 (3 unstable [all])' aptget install depender3 -s