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.
 
 
 
 
 
 

98 lines
4.1 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture "i386"
  7. setupaptarchive
  8. touch rootdir/var/lib/apt/extended_states
  9. testsuccess aptmark markauto 'libvtk5.4'
  10. testmarkedauto 'libvtk5.4'
  11. AUTOREMOVE='apt autoremove'
  12. if [ -n "$SUDO_USER" ]; then
  13. AUTOREMOVE="sudo $AUTOREMOVE"
  14. fi
  15. testsuccessequal "Reading package lists...
  16. Building dependency tree...
  17. Reading state information...
  18. The following package was automatically installed and is no longer required:
  19. libvtk5.4
  20. Use '$AUTOREMOVE' to remove it.
  21. The following NEW packages will be installed:
  22. libavcodec52
  23. 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
  24. Inst libavcodec52 (4:0.5.2-6 localhost [i386])
  25. Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s
  26. testsuccessequal "Reading package lists...
  27. Building dependency tree...
  28. Reading state information...
  29. 1 package was automatically installed and is no longer required.
  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 localhost [i386])
  35. Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s -o APT::Get::HideAutoRemove=small
  36. testfailureequal "Reading package lists...
  37. Building dependency tree...
  38. Reading state information...
  39. The following package was automatically installed and is no longer required:
  40. libvtk5.4
  41. Use '$AUTOREMOVE' to remove it.
  42. The following additional packages will be installed:
  43. libavcodec52 libopenal-dev libvtk5.4
  44. The following NEW packages will be installed:
  45. dummy-archive libavcodec52 libopenal-dev
  46. The following packages will be upgraded:
  47. libvtk5.4
  48. 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  49. Need to get 0 B/19.4 MB of archives.
  50. After this operation, 17.3 MB of additional disk space will be used.
  51. E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only
  52. testequal "Reading package lists...
  53. Building dependency tree...
  54. Reading state information...
  55. 1 package was automatically installed and is no longer required.
  56. Use '$AUTOREMOVE' to remove it.
  57. The following additional packages will be installed:
  58. libavcodec52 libopenal-dev libvtk5.4
  59. The following NEW packages will be installed:
  60. dummy-archive libavcodec52 libopenal-dev
  61. The following packages will be upgraded:
  62. libvtk5.4
  63. 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  64. Need to get 0 B/19.4 MB of archives.
  65. After this operation, 17.3 MB of additional disk space will be used.
  66. E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only -o APT::Get::HideAutoRemove=small
  67. echo -n > rootdir/var/lib/dpkg/status
  68. rm rootdir/var/lib/apt/extended_states
  69. CONFLICTING='Reading package lists...
  70. Building dependency tree...
  71. MarkInstall dummy-archive [ i386 ] < none -> 0.invalid.0 > ( admin ) FU=1
  72. MarkInstall libavcodec52 [ i386 ] < none -> 4:0.5.2-6 > ( libs ) FU=0
  73. MarkInstall libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
  74. MarkInstall libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0
  75. MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
  76. MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
  77. MarkDelete libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0
  78. The following additional packages will be installed:
  79. libavcodec52 libopenal-dev
  80. The following NEW packages will be installed:
  81. dummy-archive libavcodec52 libopenal-dev
  82. 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  83. Need to get 0 B/6304 kB of archives.
  84. After this operation, 17.3 MB of additional disk space will be used.
  85. E: Trivial Only specified but this is not a trivial operation.'
  86. testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0
  87. testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1
  88. testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small