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.
 
 
 
 
 
 

102 lines
6.5 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_binary-all_Packages
  39. ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
  40. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
  41. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
  42. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
  43. ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en" aptget indextargets --no-release-info --format '$(FILENAME)'
  44. cat >> rootdir/etc/apt/sources.list <<EOF
  45. deb http://example.org/debian stable main rocks
  46. EOF
  47. testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
  48. ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
  49. ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
  50. ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
  51. ${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages
  52. ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
  53. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
  54. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
  55. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
  56. ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
  57. W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  58. W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  59. W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  60. W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  61. W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  62. W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  63. W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  64. 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)'
  65. cat >> rootdir/etc/apt/sources.list <<EOF
  66. deb [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
  67. deb-src [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
  68. EOF
  69. testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
  70. ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
  71. ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
  72. ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
  73. ${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages
  74. ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
  75. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
  76. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
  77. ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
  78. ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
  79. ${APTLISTS}/example.org_debian_dists_stable_main_Contents-amd64
  80. ${APTLISTS}/example.org_debian_dists_stable_main_Contents-all
  81. ${APTLISTS}/example.org_debian_dists_stable_Contents-amd64
  82. ${APTLISTS}/example.org_debian_dists_stable_Contents-all
  83. ${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-amd64
  84. ${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-all
  85. W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  86. W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  87. W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  88. W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  89. W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  90. W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  91. W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  92. W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
  93. W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
  94. W: Target Contents2 wants to acquire the same file (main/Contents-all) as Contents1 from source ${APTETC}/sources.list:4
  95. W: Target Contents2 wants to acquire the same file (rocks/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
  96. W: Target Contents2 wants to acquire the same file (rocks/Contents-all) as Contents1 from source ${APTETC}/sources.list:4" aptget indextargets --no-release-info --format '$(FILENAME)'