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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. aptget install b --reinstall -y -qq 2>&1 > /dev/null
  41. testdpkgnotinstalled a
  42. testdpkginstalled b c
  43. testmarkedauto 'b'
  44. testequal 'Reading package lists...
  45. Building dependency tree...
  46. Reading state information...
  47. b is already the newest version.
  48. b set to manually installed.
  49. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b
  50. testmarkedauto
  51. aptget remove b -y -qq 2>&1 > /dev/null
  52. testdpkgnotinstalled a b c
  53. testmarkedauto
  54. aptget install a b -y -qq 2>&1 > /dev/null
  55. testdpkginstalled a b
  56. testdpkgnotinstalled c
  57. testmarkedauto
  58. aptget purge a b -y -qq 2>&1 > /dev/null
  59. testdpkgnotinstalled a b c
  60. testmarkedauto
  61. aptget install b c -y -qq 2>&1 > /dev/null
  62. testdpkgnotinstalled a
  63. testdpkginstalled b c
  64. testmarkedauto
  65. aptget install a -y -qq 2>&1 > /dev/null
  66. testdpkginstalled a b c
  67. testmarkedauto