]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-acquire-additional-files-duplicates
implement generic config fallback for methods
[apt.git] / test / integration / test-apt-acquire-additional-files-duplicates
CommitLineData
3090ae69
DK
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
3090ae69
DK
6setupenvironment
7configarchitecture 'amd64' 'i386'
8
9cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF
10Acquire::IndexTargets::deb::Contents1 {
11 MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
12 ShortDescription "Contents";
13 Description "\$(RELEASE) Contents";
14 DefaultEnabled "false";
15};
16Acquire::IndexTargets::deb::Contents2 {
17 MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
18 ShortDescription "Contents";
19 Description "\$(RELEASE) Contents";
20 DefaultEnabled "false";
21};
22Acquire::IndexTargets::deb::Contentsflat {
23 MetaKey "Contents-\$(ARCHITECTURE)";
24 ShortDescription "Contents";
25 Description "\$(RELEASE) Contents";
26 DefaultEnabled "false";
27};
28EOF
29
30mkdir -p ./rootdir/var/lib/apt/lists
31APTLISTS="$(readlink -f ./rootdir/var/lib/apt/lists)"
32APTETC="$(readlink -f ./rootdir/etc/apt)"
33cat > rootdir/etc/apt/sources.list <<EOF
34deb http://example.org/debian stable main rocks
35deb-src http://example.org/debian stable main rocks
36EOF
37testsuccessequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
38${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
39${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
40${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
1dd20368 41${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages
3090ae69
DK
42${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
43${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
44${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
1dd20368 45${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
3090ae69
DK
46${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en" aptget indextargets --no-release-info --format '$(FILENAME)'
47
48cat >> rootdir/etc/apt/sources.list <<EOF
49deb http://example.org/debian stable main rocks
50EOF
70bef325
DK
51rm -r rootdir/var/cache/apt/*.bin
52testwarning aptcache gencaches
3090ae69
DK
53testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
54${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
55${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
56${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
1dd20368 57${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages
3090ae69
DK
58${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
59${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
60${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
1dd20368 61${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
3090ae69
DK
62${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
63W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
64W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
1dd20368 65W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
3090ae69
DK
66W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
67W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
68W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
1dd20368 69W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
3090ae69
DK
70W: 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)'
71
72cat >> rootdir/etc/apt/sources.list <<EOF
73deb [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
74deb-src [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
75EOF
70bef325
DK
76rm -r rootdir/var/cache/apt/*.bin
77testwarning aptcache gencaches
3090ae69
DK
78testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
79${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
80${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
81${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
1dd20368 82${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages
3090ae69
DK
83${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
84${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
85${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
1dd20368 86${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
3090ae69
DK
87${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
88${APTLISTS}/example.org_debian_dists_stable_main_Contents-amd64
1dd20368 89${APTLISTS}/example.org_debian_dists_stable_main_Contents-all
3090ae69 90${APTLISTS}/example.org_debian_dists_stable_Contents-amd64
1dd20368 91${APTLISTS}/example.org_debian_dists_stable_Contents-all
3090ae69 92${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-amd64
1dd20368 93${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-all
3090ae69
DK
94W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
95W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
1dd20368 96W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
3090ae69
DK
97W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
98W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
99W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
1dd20368 100W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
3090ae69
DK
101W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
102W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
1dd20368
DK
103W: Target Contents2 wants to acquire the same file (main/Contents-all) as Contents1 from source ${APTETC}/sources.list:4
104W: Target Contents2 wants to acquire the same file (rocks/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
105W: 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)'