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.
 
 
 
 
 
 

122 lines
5.4 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture "i386"
  7. insertpackage 'stable' 'dummy-archive' 'i386' '0.invalid.0' 'Depends: libavcodec52, libvtk5-dev | libopenal-dev'
  8. insertpackage 'stable' 'libavcodec52' 'i386' '4:0.5.2-6' 'Conflicts: libvtk5-dev'
  9. insertpackage 'stable' 'libopenal-dev' 'i386' '1:1.12.854-2'
  10. insertpackage 'stable' 'libvtk5-dev' 'i386' '5.4.2-8' 'Depends: libvtk5.4 (= 5.4.2-8)'
  11. insertpackage 'stable' 'libvtk5.4' 'i386' '5.4.2-8' 'Depends: libavcodec52 (>= 4:0.5.1-1)'
  12. insertpackage 'stable' 'gwenview' 'i386' '4:16.08.0-1' 'Depends: libkf5kipi-bin, libkf5kipi-data'
  13. insertpackage 'stable' 'libkf5kipi-bin' 'i386' '4:16.08.0-1'
  14. insertpackage 'stable' 'libkf5kipi-data' 'i386' '4:16.08.0-1' 'Breaks: libkipi-data'
  15. insertpackage 'stable' 'libkipi-data' 'i386' '4:15.08.0-1' '' 'important'
  16. setupaptarchive
  17. cp -a rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status.backup
  18. insertinstalledpackage 'libvtk5.4' 'i386' '5.4.2-7'
  19. testsuccess aptmark markauto 'libvtk5.4'
  20. testmarkedauto 'libvtk5.4'
  21. AUTOREMOVE='apt autoremove'
  22. if [ -n "$SUDO_USER" ]; then
  23. AUTOREMOVE="sudo $AUTOREMOVE"
  24. fi
  25. testsuccessequal "Reading package lists...
  26. Building dependency tree...
  27. Reading state information...
  28. The following package was automatically installed and is no longer required:
  29. libvtk5.4
  30. Use '$AUTOREMOVE' to remove it.
  31. The following NEW packages will be installed:
  32. libavcodec52
  33. 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
  34. Inst libavcodec52 (4:0.5.2-6 stable [i386])
  35. Conf libavcodec52 (4:0.5.2-6 stable [i386])" aptget install libavcodec52 -s
  36. testsuccessequal "Reading package lists...
  37. Building dependency tree...
  38. Reading state information...
  39. 1 package was automatically installed and is no longer required.
  40. Use '$AUTOREMOVE' to remove it.
  41. The following NEW packages will be installed:
  42. libavcodec52
  43. 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
  44. Inst libavcodec52 (4:0.5.2-6 stable [i386])
  45. Conf libavcodec52 (4:0.5.2-6 stable [i386])" aptget install libavcodec52 -s -o APT::Get::HideAutoRemove=small
  46. testfailureequal "Reading package lists...
  47. Building dependency tree...
  48. Reading state information...
  49. The following package was automatically installed and is no longer required:
  50. libvtk5.4
  51. Use '$AUTOREMOVE' to remove it.
  52. The following additional packages will be installed:
  53. libavcodec52 libopenal-dev libvtk5.4
  54. The following NEW packages will be installed:
  55. dummy-archive libavcodec52 libopenal-dev
  56. The following packages will be upgraded:
  57. libvtk5.4
  58. 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  59. After this operation, 129 kB of additional disk space will be used.
  60. E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only
  61. testequal "Reading package lists...
  62. Building dependency tree...
  63. Reading state information...
  64. 1 package was automatically installed and is no longer required.
  65. Use '$AUTOREMOVE' to remove it.
  66. The following additional packages will be installed:
  67. libavcodec52 libopenal-dev libvtk5.4
  68. The following NEW packages will be installed:
  69. dummy-archive libavcodec52 libopenal-dev
  70. The following packages will be upgraded:
  71. libvtk5.4
  72. 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  73. After this operation, 129 kB of additional disk space will be used.
  74. E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only -o APT::Get::HideAutoRemove=small
  75. cp rootdir/var/lib/dpkg/status.backup rootdir/var/lib/dpkg/status
  76. rm -f rootdir/var/lib/apt/extended_states
  77. CONFLICTING='Reading package lists...
  78. Building dependency tree...
  79. MarkInstall dummy-archive:i386 < none -> 0.invalid.0 @un puN Ib > FU=1
  80. MarkInstall libavcodec52:i386 < none -> 4:0.5.2-6 @un uN > FU=0
  81. MarkInstall libvtk5-dev:i386 < none -> 5.4.2-8 @un uN Ib > FU=0
  82. MarkInstall libvtk5.4:i386 < none -> 5.4.2-8 @un uN > FU=0
  83. MarkKeep libvtk5-dev:i386 < none -> 5.4.2-8 @un uN > FU=0
  84. MarkKeep libvtk5-dev:i386 < none -> 5.4.2-8 @un uN > FU=0
  85. MarkDelete libvtk5.4:i386 < none -> 5.4.2-8 @un ugN > FU=0
  86. The following additional packages will be installed:
  87. libavcodec52 libopenal-dev
  88. The following NEW packages will be installed:
  89. dummy-archive libavcodec52 libopenal-dev
  90. 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  91. After this operation, 129 kB of additional disk space will be used.
  92. E: Trivial Only specified but this is not a trivial operation.'
  93. testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0
  94. testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1
  95. testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small
  96. insertinstalledpackage 'my-metapackage' 'i386' '1' 'Depends: gwenview'
  97. insertinstalledpackage 'gwenview' 'i386' '4:15.08.0-1' 'Depends: libkipi-data
  98. Recommends: foobar' # trigger policy brokenness to avoid optimisation
  99. insertinstalledpackage 'libkipi-data' 'i386' '4:15.08.0-1' '' 'important'
  100. testsuccess aptmark markauto 'gwenview'
  101. testsuccessequal "Reading package lists...
  102. Building dependency tree...
  103. Reading state information...
  104. Calculating upgrade...
  105. The following packages have been kept back:
  106. gwenview
  107. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." apt dist-upgrade -s