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.
 
 
 
 
 
 

94 lines
3.1 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. insertpackage 'unstable' 'bar' 'i386' '1' 'Depends: foo'
  8. insertpackage 'unstable' 'foo' 'i386' '1' 'Multi-Arch: foreign
  9. Depends: libfoo1'
  10. insertpackage 'unstable' 'libfoo1' 'i386' '1' 'Multi-Arch: same'
  11. insertpackage 'experimental' 'foo' 'i386' '2' 'Multi-Arch: foreign
  12. Depends: libfoo1 (>= 2)'
  13. insertpackage 'experimental' 'libfoo1' 'i386' '2' 'Multi-Arch: same'
  14. # note: the system has amd64 not configured!
  15. insertinstalledpackage 'foo' 'amd64' '1' 'Multi-Arch: foreign
  16. Depends: libfoo1'
  17. setupaptarchive
  18. testfailureequal "Reading package lists...
  19. Building dependency tree...
  20. You might want to run 'apt --fix-broken install' to correct these.
  21. The following packages have unmet dependencies:
  22. foo:amd64 : Depends: libfoo1:amd64 but it is not installable
  23. E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)." aptget check -s
  24. insertinstalledpackage 'libfoo1' 'amd64' '1' 'Multi-Arch: same'
  25. testsuccessequal 'Reading package lists...
  26. Building dependency tree...' aptget check -s
  27. testsuccessequal 'Reading package lists...
  28. Building dependency tree...
  29. The following additional packages will be installed:
  30. libfoo1
  31. The following packages will be REMOVED:
  32. foo:amd64
  33. The following NEW packages will be installed:
  34. foo libfoo1
  35. 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
  36. Remv foo:amd64 [1]
  37. Inst libfoo1 (1 unstable [i386])
  38. Inst foo (1 unstable [i386])
  39. Conf libfoo1 (1 unstable [i386])
  40. Conf foo (1 unstable [i386])' aptget install foo -s
  41. testsuccessequal "Reading package lists...
  42. Building dependency tree...
  43. Selected version '2' (experimental [i386]) for 'foo'
  44. Selected version '2' (experimental [i386]) for 'libfoo1' because of 'foo'
  45. The following additional packages will be installed:
  46. libfoo1
  47. The following packages will be REMOVED:
  48. foo:amd64 libfoo1:amd64
  49. The following NEW packages will be installed:
  50. foo libfoo1
  51. 0 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
  52. Remv foo:amd64 [1]
  53. Remv libfoo1:amd64 [1]
  54. Inst libfoo1 (2 experimental [i386])
  55. Inst foo (2 experimental [i386])
  56. Conf libfoo1 (2 experimental [i386])
  57. Conf foo (2 experimental [i386])" aptget install foo/experimental -s
  58. testsuccessequal 'Reading package lists...
  59. Building dependency tree...
  60. The following additional packages will be installed:
  61. foo libfoo1
  62. The following packages will be REMOVED:
  63. foo:amd64
  64. The following NEW packages will be installed:
  65. bar foo libfoo1
  66. 0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
  67. Remv foo:amd64 [1]
  68. Inst libfoo1 (1 unstable [i386])
  69. Inst foo (1 unstable [i386])
  70. Inst bar (1 unstable [i386])
  71. Conf libfoo1 (1 unstable [i386])
  72. Conf foo (1 unstable [i386])
  73. Conf bar (1 unstable [i386])' aptget install bar -s
  74. configarchitecture 'i386' 'amd64'
  75. testsuccessequal 'Reading package lists...
  76. Building dependency tree...
  77. The following NEW packages will be installed:
  78. bar
  79. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  80. Inst bar (1 unstable [i386])
  81. Conf bar (1 unstable [i386])' aptget install bar -s