test-apt-acquire-additional-files-duplicates 6.7 KB

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