test-apt-get-build-dep 2.5 KB

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