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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. insertinstalledpackage 'fine' 'i386,amd64' '1' 'Multi-Arch: same'
  10. insertpackage 'stable' 'fine' 'i386,amd64' '1' 'Multi-Arch: same'
  11. insertpackage 'unstable' 'fine' 'amd64,i386' '2' '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. insertinstalledpackage 'out-of-sync-native' 'i386,amd64' '1' 'Multi-Arch: same'
  16. insertpackage 'stable' 'out-of-sync-native' 'i386,amd64' '1' 'Multi-Arch: same'
  17. insertpackage 'unstable' 'out-of-sync-native' 'amd64' '2' 'Multi-Arch: same'
  18. insertinstalledpackage 'out-of-sync-foreign' 'i386,amd64' '1' 'Multi-Arch: same'
  19. insertpackage 'stable' 'out-of-sync-foreign' 'i386,amd64' '1' 'Multi-Arch: same'
  20. insertpackage 'unstable' 'out-of-sync-foreign' 'i386' '2' 'Multi-Arch: same'
  21. insertinstalledpackage 'out-of-sync-gone-native' 'i386,amd64' '1' 'Multi-Arch: same'
  22. insertpackage 'stable' 'out-of-sync-gone-native' 'i386' '1' 'Multi-Arch: same'
  23. insertpackage 'unstable' 'out-of-sync-gone-native' 'i386' '2' 'Multi-Arch: same'
  24. insertinstalledpackage 'out-of-sync-gone-foreign' 'i386,amd64' '1' 'Multi-Arch: same'
  25. insertpackage 'stable' 'out-of-sync-gone-foreign' 'amd64' '1' 'Multi-Arch: same'
  26. insertpackage 'unstable' 'out-of-sync-gone-foreign' 'amd64' '2' 'Multi-Arch: same'
  27. insertpackage 'stable' 'libsame2' 'i386' '1' 'Multi-Arch: same'
  28. insertpackage 'unstable' 'libsame2' 'amd64' '2' 'Multi-Arch: same'
  29. insertpackage 'unstable' 'depender2' 'all' '2' 'Depends: libsame2 (= 2)'
  30. insertpackage 'stable' 'libsame3' 'i386' '1' 'Multi-Arch: same'
  31. insertpackage 'unstable' 'libsame3' 'i386,amd64' '3' 'Multi-Arch: same'
  32. insertpackage 'unstable' 'depender3' 'all' '3' 'Depends: libsame3 (= 3)'
  33. setupaptarchive
  34. testequal 'Reading package lists...
  35. Building dependency tree...
  36. Calculating upgrade...
  37. The following packages will be REMOVED:
  38. out-of-sync-gone-foreign:i386 out-of-sync-gone-native
  39. The following packages have been kept back:
  40. out-of-sync-foreign:i386 out-of-sync-native
  41. The following packages will be upgraded:
  42. fine fine:i386 fine-installed fine-installed:i386 out-of-sync-gone-foreign
  43. out-of-sync-gone-native:i386
  44. 6 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
  45. Remv out-of-sync-gone-foreign:i386 [1]
  46. Remv out-of-sync-gone-native [1]
  47. Inst fine [1] (2 unstable [amd64]) [fine:amd64 on fine:i386] [fine:i386 on fine:amd64] [fine:i386 ]
  48. Inst fine:i386 [1] (2 unstable [i386])
  49. Inst fine-installed [1] (2 unstable [amd64]) [fine-installed:amd64 on fine-installed:i386] [fine-installed:i386 on fine-installed:amd64] [fine-installed:i386 ]
  50. Inst fine-installed:i386 [1] (2 unstable [i386])
  51. Inst out-of-sync-gone-foreign [1] (2 unstable [amd64])
  52. Inst out-of-sync-gone-native:i386 [1] (2 unstable [i386])
  53. Conf fine:i386 (2 unstable [i386])
  54. Conf fine (2 unstable [amd64])
  55. Conf fine-installed:i386 (2 unstable [i386])
  56. Conf fine-installed (2 unstable [amd64])
  57. Conf out-of-sync-gone-foreign (2 unstable [amd64])
  58. Conf out-of-sync-gone-native:i386 (2 unstable [i386])' aptget dist-upgrade -s #-o Debug::pkgDepCache::Marker=1
  59. rm rootdir/var/lib/dpkg/status
  60. insertinstalledpackage 'libsame2' 'i386' '1' 'Multi-Arch: same'
  61. insertinstalledpackage 'libsame3' 'i386' '1' 'Multi-Arch: same'
  62. # the error message isn't great, but better than nothing, right?
  63. testequal 'Reading package lists...
  64. Building dependency tree...
  65. Some packages could not be installed. This may mean that you have
  66. requested an impossible situation or if you are using the unstable
  67. distribution that some required packages have not yet been created
  68. or been moved out of Incoming.
  69. The following information may help to resolve the situation:
  70. The following packages have unmet dependencies:
  71. depender2 : Depends: libsame2 (= 2) but it is not going to be installed
  72. E: Unable to correct problems, you have held broken packages.' aptget install depender2 -s
  73. testequal 'Reading package lists...
  74. Building dependency tree...
  75. The following extra packages will be installed:
  76. libsame3:i386 libsame3
  77. The following NEW packages will be installed:
  78. depender3 libsame3
  79. The following packages will be upgraded:
  80. libsame3:i386
  81. 1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  82. Inst libsame3:i386 [1] (3 unstable [i386])
  83. Inst libsame3 (3 unstable [amd64])
  84. Inst depender3 (3 unstable [all])
  85. Conf libsame3:i386 (3 unstable [i386])
  86. Conf libsame3 (3 unstable [amd64])
  87. Conf depender3 (3 unstable [all])' aptget install depender3 -s