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