test-apt-get-build-dep 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture "i386"
  7. buildsimplenativepackage 'debhelper' 'i386' '7' 'stable'
  8. buildsimplenativepackage 'build-essential' 'i386' '1' 'stable'
  9. setupaptarchive
  10. cat > 2vcard_0.5-3.dsc <<EOF
  11. Format: 1.0
  12. Source: 2vcard
  13. Binary: 2vcard
  14. Architecture: all
  15. Version: 0.5-3
  16. Maintainer: Martin Albisetti <argentina@gmail.com>
  17. Uploaders: Marcela Tiznado <mlt@debian.org>
  18. Standards-Version: 3.8.0
  19. Build-Depends: debhelper (>= 5.0.37)
  20. Checksums-Sha1:
  21. b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
  22. 5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
  23. Checksums-Sha256:
  24. efdc22859ac2f8f030d038dc4faa9020082ebae34212498c288968ffd45c9764 9398 2vcard_0.5.orig.tar.gz
  25. 82673ff3456af571094066c89bcea87b25c23c87cf1d0050b731e5222563626b 2036 2vcard_0.5-3.diff.gz
  26. Files:
  27. f73a69c170f772f3f6e75f2d11bbb792 9398 2vcard_0.5.orig.tar.gz
  28. 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
  29. EOF
  30. testequal "Reading package lists...
  31. Building dependency tree...
  32. Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
  33. The following NEW packages will be installed:
  34. build-essential debhelper
  35. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  36. Inst build-essential (1 stable [i386])
  37. Inst debhelper (7 stable [i386])
  38. Conf build-essential (1 stable [i386])
  39. Conf debhelper (7 stable [i386])" aptget build-dep -s 2vcard_0.5-3.dsc
  40. cat > 2vcard_0.5-3.dsc <<EOF
  41. -----BEGIN PGP SIGNED MESSAGE-----
  42. Hash: SHA1
  43. Format: 1.0
  44. Source: 2vcard
  45. Binary: 2vcard
  46. Architecture: all
  47. Version: 0.5-3
  48. Maintainer: Martin Albisetti <argentina@gmail.com>
  49. Uploaders: Marcela Tiznado <mlt@debian.org>
  50. Standards-Version: 3.8.0
  51. Build-Depends: debhelper (>= 5.0.37)
  52. Checksums-Sha1:
  53. b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
  54. 5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
  55. Checksums-Sha256:
  56. efdc22859ac2f8f030d038dc4faa9020082ebae34212498c288968ffd45c9764 9398 2vcard_0.5.orig.tar.gz
  57. 82673ff3456af571094066c89bcea87b25c23c87cf1d0050b731e5222563626b 2036 2vcard_0.5-3.diff.gz
  58. Files:
  59. f73a69c170f772f3f6e75f2d11bbb792 9398 2vcard_0.5.orig.tar.gz
  60. 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
  61. -----BEGIN PGP SIGNATURE-----
  62. Version: GnuPG v1.4.9 (GNU/Linux)
  63. iEYEARECAAYFAkijKhsACgkQsrBfRdYmq7aA2gCfaOW9riTYVQMx5ajKQVAcctlC
  64. z2UAn1oXgTai6opwhVfkxrlmJ+iRxzuc
  65. =4eRd
  66. -----END PGP SIGNATURE-----
  67. EOF
  68. testequal "Reading package lists...
  69. Building dependency tree...
  70. Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
  71. The following NEW packages will be installed:
  72. build-essential debhelper
  73. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  74. Inst build-essential (1 stable [i386])
  75. Inst debhelper (7 stable [i386])
  76. Conf build-essential (1 stable [i386])
  77. Conf debhelper (7 stable [i386])" aptget build-dep --simulate 2vcard_0.5-3.dsc
  78. # unpacked source dir
  79. mkdir -p foo-1.0/debian
  80. cat > foo-1.0/debian/control <<'EOF'
  81. Source: apturl
  82. Section: admin
  83. Priority: optional
  84. Maintainer: Michael Vogt <mvo@ubuntu.com>
  85. Build-Depends: debhelper (>= 7)
  86. X-Python3-Version: >= 3.2
  87. Standards-Version: 3.9.3
  88. Package: apturl-common
  89. Architecture: any
  90. Depends: ${python3:Depends},
  91. ${shlibs:Depends},
  92. ${misc:Depends},
  93. python3-apt,
  94. python3-update-manager
  95. Replaces: apturl (<< 0.3.6ubuntu2)
  96. Description: install packages using the apt protocol - common data
  97. AptUrl is a simple graphical application that takes an URL (which follows the
  98. apt-protocol) as a command line option, parses it and carries out the
  99. operations that the URL describes (that is, it asks the user if he wants the
  100. indicated packages to be installed and if the answer is positive does so for
  101. him).
  102. .
  103. This package contains the common data shared between the frontends.
  104. EOF
  105. testequal "Reading package lists...
  106. Building dependency tree...
  107. Note, using directory './foo-1.0' to get the build dependencies
  108. The following NEW packages will be installed:
  109. build-essential debhelper
  110. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  111. Inst build-essential (1 stable [i386])
  112. Inst debhelper (7 stable [i386])
  113. Conf build-essential (1 stable [i386])
  114. Conf debhelper (7 stable [i386])" aptget build-dep --simulate ./foo-1.0