test-bug-611729-mark-as-manual 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture "i386"
  7. buildsimplenativepackage "peace-dpkg" "all" "1.0" "stable"
  8. buildsimplenativepackage "a" "all" "1.0" "stable" "Depends: b"
  9. buildsimplenativepackage "b" "all" "1.0" "stable"
  10. buildsimplenativepackage "c" "all" "1.0" "stable" "Depends: b"
  11. setupaptarchive
  12. # dpkg freaks out if the last package is removed so keep one around
  13. aptget install peace-dpkg -y -qq 2>&1 > /dev/null
  14. testdpkginstalled peace-dpkg
  15. testfileequal 'rootdir/var/lib/apt/extended_states' ''
  16. aptget install a -y -qq 2>&1 > /dev/null
  17. testdpkginstalled a b
  18. testdpkgnotinstalled c
  19. testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
  20. Architecture: i386
  21. Auto-Installed: 1
  22. '
  23. aptget remove a -y -qq 2>&1 > /dev/null
  24. testdpkgnotinstalled a c
  25. testdpkginstalled b
  26. testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
  27. Architecture: i386
  28. Auto-Installed: 1
  29. '
  30. aptget install c -y -qq 2>&1 > /dev/null
  31. testdpkgnotinstalled a
  32. testdpkginstalled b c
  33. testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
  34. Architecture: i386
  35. Auto-Installed: 1
  36. '
  37. testequal 'Reading package lists...
  38. Building dependency tree...
  39. Reading state information...
  40. b is already the newest version.
  41. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade
  42. testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
  43. Architecture: i386
  44. Auto-Installed: 1
  45. '
  46. testequal 'Reading package lists...
  47. Building dependency tree...
  48. Reading state information...
  49. b is already the newest version.
  50. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d
  51. testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
  52. Architecture: i386
  53. Auto-Installed: 1
  54. '
  55. aptget install b --reinstall -y -qq 2>&1 > /dev/null
  56. testdpkgnotinstalled a
  57. testdpkginstalled b c
  58. testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
  59. Architecture: i386
  60. Auto-Installed: 1
  61. '
  62. testequal 'Reading package lists...
  63. Building dependency tree...
  64. Reading state information...
  65. b is already the newest version.
  66. b set to manually installed.
  67. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b
  68. testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
  69. Architecture: i386
  70. Auto-Installed: 0
  71. '
  72. aptget remove b -y -qq 2>&1 > /dev/null
  73. testdpkgnotinstalled a b c
  74. testfileequal 'rootdir/var/lib/apt/extended_states' ''
  75. aptget install a b -y -qq 2>&1 > /dev/null
  76. testdpkginstalled a b
  77. testdpkgnotinstalled c
  78. testfileequal 'rootdir/var/lib/apt/extended_states' ''
  79. aptget purge a b -y -qq 2>&1 > /dev/null
  80. testdpkgnotinstalled a b c
  81. testfileequal 'rootdir/var/lib/apt/extended_states' ''
  82. aptget install b c -y -qq 2>&1 > /dev/null
  83. testdpkgnotinstalled a
  84. testdpkginstalled b c
  85. testfileequal 'rootdir/var/lib/apt/extended_states' ''
  86. aptget install a -y -qq 2>&1 > /dev/null
  87. testdpkginstalled a b c
  88. testfileequal 'rootdir/var/lib/apt/extended_states' ''