test-bug-604222-new-and-autoremove 4.1 KB

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