]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-acquire-additional-files-duplicates
add --sha512 option + documentation for apt-ftparchive
[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_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
46 cat >> rootdir/etc/apt/sources.list <<EOF
47 deb http://example.org/debian stable main rocks
48 EOF
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_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
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 Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
60 W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
61 W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
62 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)'
63
64 cat >> rootdir/etc/apt/sources.list <<EOF
65 deb [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
66 deb-src [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
67 EOF
68 testwarningequal "${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
79 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
80 W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
81 W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
82 W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
83 W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
84 W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
85 W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
86 W: 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)'