summaryrefslogtreecommitdiffstats
path: root/tests/easyupdate.test
blob: 4801c9a04936008459e9266437eccc79c74164b2 (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
set -u
. "$TESTSDIR"/test.inc

mkdir -p test/a test/dists/name/comp/source
mkdir bla
tar -czf test/a/a.tar.gz bla
rmdir bla

cat > test/a/a.dsc <<EOF
Format: 3.0 (native)
Source: apackage
Version: 0-1
Maintainer: noone <noone@nowhere.tld>
Checksums-Sha1:
 $(sha1andsize test/a/a.tar.gz) a.tar.gz
EOF

cat > test/dists/name/comp/source/Sources <<EOF
Package: apackage
Version: 0-1
Priority: extra
Section: devel
Maintainer: noone <noone@nowhere.tld>
Directory: a
Files:
 $(mdandsize test/a/a.dsc) a.dsc
 $(mdandsize test/a/a.tar.gz) a.tar.gz
Checksums-Sha1:
 $(sha1andsize test/a/a.dsc) a.dsc
 $(sha1andsize test/a/a.tar.gz) a.tar.gz
EOF

mkdir conf

cat > conf/distributions <<EOF
Codename: test1
Architectures: source
Components: everything
Update: u

Codename: test2
Architectures: source
Components: everything
Update: - u
EOF
cat > conf/updates <<EOF
Name: u
Method: file:${WORKDIR}/test
Suite: name
Components: comp>everything
IgnoreRelease: Yes
DownloadListsAs: .
EOF

testrun - update test1 3<<EOF
-v6=aptmethod start 'file:${WORKDIR}/test/dists/name/comp/source/Sources'
-v1*=aptmethod got 'file:${WORKDIR}/test/dists/name/comp/source/Sources'
-v2*=Copy file '${WORKDIR}/test/dists/name/comp/source/Sources' to './lists/u_name_comp_Sources'...
-v6=aptmethod start 'file:${WORKDIR}/test/a/a.dsc'
-v1*=aptmethod got 'file:${WORKDIR}/test/a/a.dsc'
-v2*=Linking file '${WORKDIR}/test/a/a.dsc' to './pool/everything/a/apackage/a.dsc'...
-v6=aptmethod start 'file:${WORKDIR}/test/a/a.tar.gz'
-v1*=aptmethod got 'file:${WORKDIR}/test/a/a.tar.gz'
-v2*=Linking file '${WORKDIR}/test/a/a.tar.gz' to './pool/everything/a/apackage/a.tar.gz'...
stdout
$(odb)
-v2*=Created directory "./lists"
-v0*=Calculating packages to get...
-v3*=  processing updates for 'test1|everything|source'
-v5*=  reading './lists/u_name_comp_Sources'
-v2*=Created directory "./pool"
-v2*=Created directory "./pool/everything"
-v2*=Created directory "./pool/everything/a"
-v2*=Created directory "./pool/everything/a/apackage"
-v0*=Getting packages...
$(ofa pool/everything/a/apackage/a.dsc)
$(ofa pool/everything/a/apackage/a.tar.gz)
-v1*=Shutting down aptmethods...
-v0*=Installing (and possibly deleting) packages...
$(opa apackage 0-1 test1 everything source dsc)
-v0*=Exporting indices...
-v2*=Created directory "./dists"
-v2*=Created directory "./dists/test1"
-v2*=Created directory "./dists/test1/everything"
-v2*=Created directory "./dists/test1/everything/source"
-v6*= looking for changes in 'test1|everything|source'...
-v6*=  creating './dists/test1/everything/source/Sources' (gzipped)
EOF

testrun - update test2 3<<EOF
-v6=aptmethod start 'file:${WORKDIR}/test/dists/name/comp/source/Sources'
-v1*=aptmethod got 'file:${WORKDIR}/test/dists/name/comp/source/Sources'
-v2*=Copy file '${WORKDIR}/test/dists/name/comp/source/Sources' to './lists/u_name_comp_Sources'...
stdout
-v0*=Calculating packages to get...
-v3*=  processing updates for 'test2|everything|source'
-v5*=  marking everything to be deleted
-v5*=  reading './lists/u_name_comp_Sources'
-v0*=Getting packages...
-v1*=Shutting down aptmethods...
-v0*=Installing (and possibly deleting) packages...
$(opa apackage 0-1 test2 everything source dsc)
-v0*=Exporting indices...
-v2*=Created directory "./dists/test2"
-v2*=Created directory "./dists/test2/everything"
-v2*=Created directory "./dists/test2/everything/source"
-v6*= looking for changes in 'test2|everything|source'...
-v6*=  creating './dists/test2/everything/source/Sources' (gzipped)
EOF

testrun - update test2 3<<EOF
-v6=aptmethod start 'file:${WORKDIR}/test/dists/name/comp/source/Sources'
-v1*=aptmethod got 'file:${WORKDIR}/test/dists/name/comp/source/Sources'
-v2*=Copy file '${WORKDIR}/test/dists/name/comp/source/Sources' to './lists/u_name_comp_Sources'...
stdout
-v0*=Calculating packages to get...
-v3*=  processing updates for 'test2|everything|source'
-v5*=  marking everything to be deleted
-v5*=  reading './lists/u_name_comp_Sources'
EOF

true > test/dists/name/comp/source/Sources

testrun - update test2 3<<EOF
-v6=aptmethod start 'file:${WORKDIR}/test/dists/name/comp/source/Sources'
-v1*=aptmethod got 'file:${WORKDIR}/test/dists/name/comp/source/Sources'
-v2*=Copy file '${WORKDIR}/test/dists/name/comp/source/Sources' to './lists/u_name_comp_Sources'...
stdout
-v0*=Calculating packages to get...
-v3*=  processing updates for 'test2|everything|source'
-v5*=  marking everything to be deleted
-v5*=  reading './lists/u_name_comp_Sources'
-v0*=Getting packages...
-v1*=Shutting down aptmethods...
-v0*=Installing (and possibly deleting) packages...
$(opd apackage 0-1 test2 everything source dsc)
-v0*=Exporting indices...
-v6*= looking for changes in 'test2|everything|source'...
-v6*=  replacing './dists/test2/everything/source/Sources' (gzipped)
EOF

testsuccess