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.
 
 
 
 
 
 

59 lines
1.6 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. insertpackage 'stable' 'build-depends' 'i386' '1'
  8. insertpackage 'stable' 'foo' 'i386' '1'
  9. insertinstalledpackage 'build-essential' 'i386' '1'
  10. setupaptarchive
  11. # This used to be interpreted as build-depends | foo
  12. cat > foobar.dsc <<EOF
  13. Format: 3.0 (native)
  14. Source: foobar
  15. Binary: foobar
  16. Architecture: all
  17. Version: 1
  18. Maintainer: Joe Sixpack <joe@example.org>
  19. Build-Depends: build-depends [i386] | build-depends [amd64], foo
  20. Standards-Version: 3.9.8
  21. EOF
  22. testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
  23. Reading package lists...
  24. Building dependency tree...
  25. The following NEW packages will be installed:
  26. build-depends foo
  27. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  28. Inst build-depends (1 stable [i386])
  29. Inst foo (1 stable [i386])
  30. Conf build-depends (1 stable [i386])
  31. Conf foo (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc
  32. # This caused a segmentation fault
  33. cat > foobar.dsc <<EOF
  34. Format: 3.0 (native)
  35. Source: foobar
  36. Binary: foobar
  37. Architecture: all
  38. Version: 1
  39. Maintainer: Joe Sixpack <joe@example.org>
  40. Build-Depends: build-depends [i386] | build-depends [amd64]
  41. Standards-Version: 3.9.8
  42. EOF
  43. testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
  44. Reading package lists...
  45. Building dependency tree...
  46. The following NEW packages will be installed:
  47. build-depends
  48. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  49. Inst build-depends (1 stable [i386])
  50. Conf build-depends (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc