]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-acquire-additional-files-duplicates
do delay the test for http, too, to make it more reliable
[apt.git] / test / integration / test-apt-acquire-additional-files-duplicates
CommitLineData
3090ae69
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
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
41${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
42${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
43${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
44${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en" aptget indextargets --no-release-info --format '$(FILENAME)'
45
46cat >> rootdir/etc/apt/sources.list <<EOF
47deb http://example.org/debian stable main rocks
48EOF
49testwarningequal "${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_i18n_Translation-en
54${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
55${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
56${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
57W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
58W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
59W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
60W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
61W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
62W: 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)'
63
64cat >> rootdir/etc/apt/sources.list <<EOF
65deb [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
66deb-src [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
67EOF
68testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
69${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
70${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
71${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
72${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
73${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
74${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
75${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
76${APTLISTS}/example.org_debian_dists_stable_main_Contents-amd64
77${APTLISTS}/example.org_debian_dists_stable_Contents-amd64
78${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-amd64
79W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
80W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
81W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
82W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
83W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
84W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
85W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
86W: 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)'