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.
 
 
 
 
 
 

36 lines
847 B

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'native'
  7. configdpkgnoopchroot
  8. # create a bunch of test pkgs
  9. createtestpkg() {
  10. setupsimplenativepackage "testpkg-$1" 'native' '1.0' 'unstable'
  11. BUILDDIR="incoming/testpkg-$1-1.0"
  12. echo '#!/bin/sh
  13. echo PATH=$PATH' > "${BUILDDIR}/debian/preinst"
  14. buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
  15. rm -rf "$BUILDDIR"
  16. }
  17. createtestpkg 'one'
  18. createtestpkg 'two'
  19. setupaptarchive
  20. # Inherit from environment
  21. testsuccess aptget install testpkg-one -y -o DPkg::Path=""
  22. cp rootdir/tmp/testsuccess.output apt.log
  23. testsuccess grep "PATH=$PATH" apt.log
  24. # Set a custom value
  25. testsuccess aptget install testpkg-two -y -o DPkg::Path="foobar:$PATH"
  26. cp rootdir/tmp/testsuccess.output apt.log
  27. testsuccess grep "PATH=foobar:$PATH" apt.log