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.
 
 
 
 
 
 

87 lines
5.2 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'amd64' 'i386'
  7. cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF
  8. Acquire::IndexTargets::deb::Contents1 {
  9. MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
  10. ShortDescription "Contents";
  11. Description "\$(RELEASE) Contents";
  12. DefaultEnabled "false";
  13. };
  14. Acquire::IndexTargets::deb::Contents2 {
  15. MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
  16. ShortDescription "Contents";
  17. Description "\$(RELEASE) Contents";
  18. DefaultEnabled "false";
  19. };
  20. Acquire::IndexTargets::deb::Contentsflat {
  21. MetaKey "Contents-\$(ARCHITECTURE)";
  22. ShortDescription "Contents";
  23. Description "\$(RELEASE) Contents";
  24. DefaultEnabled "false";
  25. };
  26. EOF
  27. mkdir -p ./rootdir/var/lib/apt/lists
  28. APTLISTS="$(readlink -f ./rootdir/var/lib/apt/lists)"
  29. APTETC="$(readlink -f ./rootdir/etc/apt)"
  30. cat > rootdir/etc/apt/sources.list <<EOF
  31. deb http://example.org/debian stable main rocks
  32. deb-src http://example.org/debian stable main rocks
  33. EOF
  34. testsuccessequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
  35. ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
  36. ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
  37. ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
  38. ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
  39. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
  40. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
  41. ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en" aptget indextargets --no-release-info --format '$(FILENAME)'
  42. cat >> rootdir/etc/apt/sources.list <<EOF
  43. deb http://example.org/debian stable main rocks
  44. EOF
  45. testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
  46. ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
  47. ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
  48. ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
  49. ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
  50. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
  51. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
  52. ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
  53. W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  54. W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  55. W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  56. W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  57. W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  58. W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3" aptget indextargets --no-release-info --format '$(FILENAME)'
  59. cat >> rootdir/etc/apt/sources.list <<EOF
  60. deb [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
  61. deb-src [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
  62. EOF
  63. testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
  64. ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
  65. ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
  66. ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
  67. ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
  68. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
  69. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
  70. ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
  71. ${APTLISTS}/example.org_debian_dists_stable_main_Contents-amd64
  72. ${APTLISTS}/example.org_debian_dists_stable_Contents-amd64
  73. ${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-amd64
  74. W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  75. W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  76. W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  77. W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  78. W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  79. W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  80. W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
  81. W: Target Contents2 wants to acquire the same file (rocks/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4" aptget indextargets --no-release-info --format '$(FILENAME)'