summaryrefslogtreecommitdiffstats
path: root/test/integration/test-apt-acquire-additional-files-duplicates
blob: b0b6460fe3645344e4dae394a2fa3980d9fa37bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'

cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF
Acquire::IndexTargets::deb::Contents1 {
	MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
	ShortDescription "Contents";
	Description "\$(RELEASE) Contents";
	DefaultEnabled "false";
};
Acquire::IndexTargets::deb::Contents2 {
	MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
	ShortDescription "Contents";
	Description "\$(RELEASE) Contents";
	DefaultEnabled "false";
};
Acquire::IndexTargets::deb::Contentsflat {
	MetaKey "Contents-\$(ARCHITECTURE)";
	ShortDescription "Contents";
	Description "\$(RELEASE) Contents";
	DefaultEnabled "false";
};
EOF

mkdir -p ./rootdir/var/lib/apt/lists
APTLISTS="$(readlink -f ./rootdir/var/lib/apt/lists)"
APTETC="$(readlink -f ./rootdir/etc/apt)"
cat > rootdir/etc/apt/sources.list <<EOF
deb http://example.org/debian stable main rocks
deb-src http://example.org/debian stable main rocks
EOF
testsuccessequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages
${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en" aptget indextargets --no-release-info --format '$(FILENAME)'

cat >> rootdir/etc/apt/sources.list <<EOF
deb http://example.org/debian stable main rocks
EOF
rm -r rootdir/var/cache/apt/*.bin
testwarning aptcache gencaches
testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages
${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
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)'

cat >> rootdir/etc/apt/sources.list <<EOF
deb [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
deb-src [target=Contents1,Contents2,Contentsflat arch=amd64] http://example.org/debian stable main rocks
EOF
rm -r rootdir/var/cache/apt/*.bin
testwarning aptcache gencaches
testwarningequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Sources
${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources
${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages
${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages
${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages
${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages
${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
${APTLISTS}/example.org_debian_dists_stable_main_Contents-amd64
${APTLISTS}/example.org_debian_dists_stable_main_Contents-all
${APTLISTS}/example.org_debian_dists_stable_Contents-amd64
${APTLISTS}/example.org_debian_dists_stable_Contents-all
${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-amd64
${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-all
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
W: Target Contents2 wants to acquire the same file (main/Contents-all) as Contents1 from source ${APTETC}/sources.list:4
W: Target Contents2 wants to acquire the same file (rocks/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
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)'