summaryrefslogtreecommitdiffstats
path: root/tests/wrongarch.test
blob: ab1abf77542b009440fb6218f6fbaab9f1f58e30 (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
set -u
. "$TESTSDIR"/test.inc

mkdir conf
cat > conf/distributions <<EOF
Codename: test
Architectures: a1 a2 source
Components: main
Update: update
EOF
cat > conf/updates <<EOF
Name: update
Architectures: a>a2 source
Suite: test
Method: file:${WORKDIR}/test
IgnoreRelease: yes
EOF
mkdir test
mkdir test/dists
mkdir test/dists/test
mkdir test/dists/test/main
mkdir test/dists/test/main/binary-a
mkdir test/dists/test/main/source

cat > test/dists/test/main/binary-a/Packages <<EOF
Package: fake1
Version: 0a
Architecture: a
Filename: filename
Size: 1
MD5sum: 1111111111111111

Package: fake2
Version: 2all
Architecture: all
Filename: filename
Size: 1
MD5sum: 1111111111111111
EOF
cat > test/dists/test/main/source/Sources <<EOF
Package: fake1
Version: 0s
Files:
 1111111111111111 1 somefile

Package: fake2
Version: 2s
Files:
 1111111111111111 1 somefile
EOF

testrun - dumpupdate 3<<EOF
stderr
-v6=aptmethod start 'file:${WORKDIR}/test/dists/test/main/binary-a/Packages.gz'
*=aptmethod error receiving 'file:${WORKDIR}/test/dists/test/main/binary-a/Packages.gz':
='<File not there, apt-method suggests '${WORKDIR}/test/dists/test/main/binary-a/Packages' instead>'
='File not found'
='File not found - ${WORKDIR}/test/dists/test/main/binary-a/Packages.gz (2: No such file or directory)'
-v6=aptmethod start 'file:${WORKDIR}/test/dists/test/main/binary-a/Packages.bz2'
*=aptmethod error receiving 'file:${WORKDIR}/test/dists/test/main/binary-a/Packages.bz2':
='File not found - ${WORKDIR}/test/dists/test/main/binary-a/Packages.bz2 (2: No such file or directory)'
-v6=aptmethod start 'file:${WORKDIR}/test/dists/test/main/source/Sources.gz'
*=aptmethod error receiving 'file:${WORKDIR}/test/dists/test/main/source/Sources.gz':
='File not found - ${WORKDIR}/test/dists/test/main/source/Sources.gz (2: No such file or directory)'
='<File not there, apt-method suggests '${WORKDIR}/test/dists/test/main/source/Sources' instead>'
-v6=aptmethod start 'file:${WORKDIR}/test/dists/test/main/source/Sources.bz2'
*=aptmethod error receiving 'file:${WORKDIR}/test/dists/test/main/source/Sources.bz2':
='File not found - ${WORKDIR}/test/dists/test/main/source/Sources.bz2 (2: No such file or directory)'
-v6=aptmethod start 'file:${WORKDIR}/test/dists/test/main/binary-a/Packages'
-v1*=aptmethod got 'file:${WORKDIR}/test/dists/test/main/binary-a/Packages'
-v2*=Copy file '${WORKDIR}/test/dists/test/main/binary-a/Packages' to './lists/update_test_main_a_Packages'...
-v6=aptmethod start 'file:${WORKDIR}/test/dists/test/main/source/Sources'
-v1*=aptmethod got 'file:${WORKDIR}/test/dists/test/main/source/Sources'
-v2*=Copy file '${WORKDIR}/test/dists/test/main/source/Sources' to './lists/update_test_main_Sources'...
stdout
$(odb)
-v2*=Created directory "./lists"
*=Updates needed for 'test|main|source':
*=add 'fake1' - '0s' 'update'
*=add 'fake2' - '2s' 'update'
*=Updates needed for 'test|main|a2':
*=add 'fake2' - '2all' 'update'
EOF

rm -r conf lists test db
testsuccess