test-apt-get-build-dep 4.0 KB

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