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.
 
 
 
 
 
 

66 lines
2.3 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. # we need this construct here as it isn't really possible to fake native arch for dpkg-* tools
  7. NATIVE="$(command dpkg --print-architecture)"
  8. configarchitecture $NATIVE
  9. insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
  10. insertinstalledpackage 'pkga' 'all' '1'
  11. buildsimplenativepackage 'pkgb' "$NATIVE" '1' 'stable' 'Conflicts: pkga'
  12. buildsimplenativepackage 'pkgc' "$NATIVE" '1' 'stable' 'Build-Depends: pkgb'
  13. setupaptarchive
  14. testsuccessequal "Reading package lists...
  15. Reading package lists...
  16. Building dependency tree...
  17. The following packages will be REMOVED:
  18. pkga
  19. The following NEW packages will be installed:
  20. pkgb
  21. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  22. Remv pkga [1]
  23. Inst pkgb (1 stable [$NATIVE])
  24. Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s
  25. testsuccessequal "Reading package lists...
  26. Reading package lists...
  27. Building dependency tree...
  28. The following packages will be REMOVED:
  29. pkga*
  30. The following NEW packages will be installed:
  31. pkgb
  32. 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  33. Purg pkga [1]
  34. Inst pkgb (1 stable [$NATIVE])
  35. Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s --purge
  36. testsuccessequal 'Reading package lists...
  37. Building dependency tree...
  38. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s
  39. testdpkgnotinstalled pkgb
  40. testsuccess apt build-dep pkgc -y -o Debug::pkgDepCache::AutoInstall=1 -o Debug::pkgDepCache::Marker=1
  41. testdpkginstalled pkgb
  42. testsuccessequal 'Reading package lists...
  43. Building dependency tree...
  44. Reading state information...
  45. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s
  46. testsuccess apt purge pkgb pkgc -y
  47. testsuccessequal 'Reading package lists...
  48. Building dependency tree...
  49. Reading state information...
  50. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s
  51. testsuccess apt build-dep pkgc -y -o APT::Get::Build-Dep-Automatic=true
  52. testsuccessequal 'Reading package lists...
  53. Building dependency tree...
  54. Reading state information...
  55. The following packages will be REMOVED:
  56. pkgb
  57. 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
  58. Remv pkgb [1]' apt autoremove -s