blob: 84e86349daf920e188328ce48dfcffcdaefdbacd (
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
set -u
. "$TESTSDIR"/test.inc
mkdir -p conf dists/c/main/source
mkdir -p conf dists/d/main/source
mkdir -p conf dists/c/main/binary-abacus
mkdir -p conf dists/d/main/binary-abacus
mkdir -p conf dists/c/component/source
mkdir -p conf dists/d/component/source
mkdir -p conf dists/c/component/binary-abacus
mkdir -p conf dists/d/component/binary-abacus
mkdir -p dists/c/main/source
mkdir -p dists/d/main/source
mkdir -p dists/c/main/binary-abacus
mkdir -p dists/d/main/binary-abacus
mkdir -p pool/main/a/aa pool/component/b/bb
mkdir -p pool/component/a/aa pool/main/b/bb
cat > conf/distributions <<EOF
Codename: c
Components: main component
Architectures: abacus source
# Don't do that at home, kids....
DebIndices: Index .
DscIndices: Index .
DebOverride: override-c-deb
DscOverride: override-c-dsc
Codename: d
Components: main component
Architectures: abacus source
# Don't do that at home, kids....
DebIndices: Index .
DscIndices: Index .
DebOverride: override-d-deb
DscOverride: override-d-dsc
EOF
cat > conf/override-c-deb <<EOF
EOF
cat > conf/override-c-dsc <<EOF
EOF
cat > conf/override-d-deb <<EOF
aa Section component/section
aa Somefield value
aa-addons Section component/addons
a* ShouldNot ShowUp
bb Section base
bb-addons Section addons
b* Section blub
EOF
cat > conf/override-d-dsc <<EOF
a* Section component/section
b? Section base
b? SomeOtherfield somevalue
b* ShouldNot ShowUp
EOF
DISTRI=c PACKAGE=aa EPOCH="" VERSION=1 REVISION="-1" SECTION="section" genpackage.sh
mv test.changes aa.changes
DISTRI=c PACKAGE=bb EPOCH="" VERSION=1 REVISION="-1" SECTION="component/base" genpackage.sh
mv test.changes bb.changes
testrun - --nodelete include c aa.changes 3<<EOF
stdout
$(odb)
$(ofa 'pool/main/a/aa/aa-addons_1-1_all.deb')
$(ofa 'pool/main/a/aa/aa_1-1_abacus.deb')
$(ofa 'pool/main/a/aa/aa_1-1.tar.gz')
$(ofa 'pool/main/a/aa/aa_1-1.dsc')
$(opa 'aa-addons' x 'c' 'main' 'abacus' 'deb')
$(opa 'aa' x 'c' 'main' 'abacus' 'deb')
$(opa 'aa' unset 'c' 'main' 'source' 'dsc')
-v0*=Exporting indices...
-v6*= looking for changes in 'c|main|abacus'...
-v6*= creating './dists/c/main/binary-abacus/Index' (uncompressed)
-v6*= looking for changes in 'c|component|abacus'...
-v6*= creating './dists/c/component/binary-abacus/Index' (uncompressed)
-v6*= looking for changes in 'c|main|source'...
-v6*= creating './dists/c/main/source/Index' (uncompressed)
-v6*= looking for changes in 'c|component|source'...
-v6*= creating './dists/c/component/source/Index' (uncompressed)
EOF
testrun - --nodelete include c bb.changes 3<<EOF
stdout
$(ofa 'pool/component/b/bb/bb-addons_1-1_all.deb')
$(ofa 'pool/component/b/bb/bb_1-1_abacus.deb')
$(ofa 'pool/component/b/bb/bb_1-1.tar.gz')
$(ofa 'pool/component/b/bb/bb_1-1.dsc')
$(opa 'bb-addons' x 'c' 'component' 'abacus' 'deb')
$(opa 'bb' x 'c' 'component' 'abacus' 'deb')
$(opa 'bb' unset 'c' 'component' 'source' 'dsc')
-v0*=Exporting indices...
-v6*= looking for changes in 'c|main|abacus'...
-v6*= looking for changes in 'c|component|abacus'...
-v6*= replacing './dists/c/component/binary-abacus/Index' (uncompressed)
-v6*= looking for changes in 'c|main|source'...
-v6*= looking for changes in 'c|component|source'...
-v6*= replacing './dists/c/component/source/Index' (uncompressed)
EOF
ed -s aa.changes <<EOF
g/^Distribution/s/ c/ d/
w
q
EOF
ed -s bb.changes <<EOF
g/^Distribution/s/ c/ d/
w
q
EOF
testrun - --nodelete include d aa.changes 3<<EOF
stdout
$(ofa 'pool/component/a/aa/aa-addons_1-1_all.deb')
$(ofa 'pool/component/a/aa/aa_1-1_abacus.deb')
$(ofa 'pool/component/a/aa/aa_1-1.tar.gz')
$(ofa 'pool/component/a/aa/aa_1-1.dsc')
$(opa 'aa-addons' x 'd' 'component' 'abacus' 'deb')
$(opa 'aa' x 'd' 'component' 'abacus' 'deb')
$(opa 'aa' unset 'd' 'component' 'source' 'dsc')
-v0*=Exporting indices...
-v6*= looking for changes in 'd|component|abacus'...
-v6*= creating './dists/d/component/binary-abacus/Index' (uncompressed)
-v6*= looking for changes in 'd|main|abacus'...
-v6*= creating './dists/d/main/binary-abacus/Index' (uncompressed)
-v6*= looking for changes in 'd|component|source'...
-v6*= creating './dists/d/component/source/Index' (uncompressed)
-v6*= looking for changes in 'd|main|source'...
-v6*= creating './dists/d/main/source/Index' (uncompressed)
EOF
testrun - --nodelete include d bb.changes 3<<EOF
stdout
$(ofa 'pool/main/b/bb/bb-addons_1-1_all.deb')
$(ofa 'pool/main/b/bb/bb_1-1_abacus.deb')
$(ofa 'pool/main/b/bb/bb_1-1.tar.gz')
$(ofa 'pool/main/b/bb/bb_1-1.dsc')
$(opa 'bb-addons' x 'd' 'main' 'abacus' 'deb')
$(opa 'bb' x 'd' 'main' 'abacus' 'deb')
$(opa 'bb' unset 'd' 'main' 'source' 'dsc')
-v0*=Exporting indices...
-v6*= looking for changes in 'd|component|abacus'...
-v6*= looking for changes in 'd|main|abacus'...
-v6*= replacing './dists/d/main/binary-abacus/Index' (uncompressed)
-v6*= looking for changes in 'd|component|source'...
-v6*= looking for changes in 'd|main|source'...
-v6*= replacing './dists/d/main/source/Index' (uncompressed)
EOF
cp dists/c/main/binary-abacus/Index Index.expected
ed -s Index.expected <<EOF
/^Priority:/i
Somefield: value
.
g/Section/s#section#component/addons#
/Section/s#addons#section#
%s/main/component/
w
EOF
dodiff Index.expected dists/d/component/binary-abacus/Index
cp dists/c/component/source/Index Index.expected
ed -s Index.expected <<EOF
/^Priority:/i
SomeOtherfield: somevalue
.
g/Section/s#component/base#base#
g/Directory/s/component/main/
w
EOF
dodiff Index.expected dists/d/main/source/Index
dodo rm -r aa* bb* pool dists db conf
testsuccess
|