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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. testmarkedauto
  16. aptget install a -y -qq 2>&1 > /dev/null
  17. testdpkginstalled a b
  18. testdpkgnotinstalled c
  19. testmarkedauto 'b'
  20. aptget remove a -y -qq 2>&1 > /dev/null
  21. testdpkgnotinstalled a c
  22. testdpkginstalled b
  23. testmarkedauto 'b'
  24. aptget install c -y -qq 2>&1 > /dev/null
  25. testdpkgnotinstalled a
  26. testdpkginstalled b c
  27. testmarkedauto 'b'
  28. testequal 'Reading package lists...
  29. Building dependency tree...
  30. Reading state information...
  31. b is already the newest version.
  32. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade
  33. testmarkedauto 'b'
  34. testequal 'Reading package lists...
  35. Building dependency tree...
  36. Reading state information...
  37. b is already the newest version.
  38. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d
  39. testmarkedauto 'b'
  40. rm rootdir/var/log/apt/history.log
  41. aptget install b --reinstall -y -qq 2>&1 > /dev/null
  42. testdpkgnotinstalled a
  43. testdpkginstalled b c
  44. testmarkedauto 'b'
  45. sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d'
  46. testfileequal 'rootdir/var/log/apt/history.log' '
  47. Reinstall: b:i386 (1.0)'
  48. testequal 'Reading package lists...
  49. Building dependency tree...
  50. Reading state information...
  51. b is already the newest version.
  52. b set to manually installed.
  53. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b
  54. testmarkedauto
  55. aptget remove b -y -qq 2>&1 > /dev/null
  56. testdpkgnotinstalled a b c
  57. testmarkedauto
  58. aptget install a b -y -qq 2>&1 > /dev/null
  59. testdpkginstalled a b
  60. testdpkgnotinstalled c
  61. testmarkedauto
  62. aptget purge a b -y -qq 2>&1 > /dev/null
  63. testdpkgnotinstalled a b c
  64. testmarkedauto
  65. aptget install b c -y -qq 2>&1 > /dev/null
  66. testdpkgnotinstalled a
  67. testdpkginstalled b c
  68. testmarkedauto
  69. aptget install a -y -qq 2>&1 > /dev/null
  70. testdpkginstalled a b c
  71. testmarkedauto