aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/resolver_TEST_any_setup.sh
blob: 92bfb1201e670b34a387972f81b73e53a31f808e (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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :

mkdir resolver_TEST_any_dir || exit 1
cd resolver_TEST_any_dir || exit 1

mkdir -p build
mkdir -p distdir
mkdir -p installed

mkdir -p repo/{profiles/profile,metadata}

cd repo
echo "repo" > profiles/repo_name
: > metadata/categories.conf

# test
echo 'test' >> metadata/categories.conf

mkdir -p 'packages/test/target'
cat <<END > packages/test/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    || ( test/dep[>=2] ( ) )
    "
END

mkdir -p 'packages/test/dep'
cat <<END > packages/test/dep/dep-3.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
END

# preferences
echo 'preferences' >> metadata/categories.conf

mkdir -p 'packages/preferences/target'
cat <<END > packages/preferences/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    || ( preferences/dep-a preferences/dep-middle preferences/dep-b )
    "
END

mkdir -p 'packages/preferences/dep-a'
cat <<END > packages/preferences/dep-a/dep-a-1.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
END

mkdir -p 'packages/preferences/dep-middle'
cat <<END > packages/preferences/dep-middle/dep-middle-1.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
END

mkdir -p 'packages/preferences/dep-b'
cat <<END > packages/preferences/dep-b/dep-b-1.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
END

# self-use-first
echo 'self-use-first' >> metadata/categories.conf

mkdir -p 'packages/self-use-first/target'
cat <<END > packages/self-use-first/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    self-use-first/dep
    "
END

mkdir -p 'packages/self-use-first/dep'
cat <<END > packages/self-use-first/dep/dep-1.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
MYOPTIONS="enabled disabled"
DEPENDENCIES="run: || ( self-use-first/dep[enabled] self-use-first/dep[disabled] )"
END

# self-use-second
echo 'self-use-second' >> metadata/categories.conf

mkdir -p 'packages/self-use-second/target'
cat <<END > packages/self-use-second/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    self-use-second/dep
    "
END

mkdir -p 'packages/self-use-second/dep'
cat <<END > packages/self-use-second/dep/dep-1.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
MYOPTIONS="enabled disabled"
DEPENDENCIES="run: || ( self-use-second/dep[disabled] self-use-second/dep[enabled] )"
END

# self-use-neither
echo 'self-use-neither' >> metadata/categories.conf

mkdir -p 'packages/self-use-neither/target'
cat <<END > packages/self-use-neither/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    self-use-neither/dep
    "
END

mkdir -p 'packages/self-use-neither/dep'
cat <<END > packages/self-use-neither/dep/dep-1.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
MYOPTIONS="disabled disabled2"
DEPENDENCIES="run: || ( self-use-neither/dep[disabled] self-use-neither/dep[disabled2] )"
END

# self-or-other
echo 'self-or-other' >> metadata/categories.conf

mkdir -p 'packages/self-or-other/target'
cat <<END > packages/self-or-other/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    || ( self-or-other/target self-or-other/other )
    "
END

mkdir -p 'packages/self-or-other/other'
cat <<END > packages/self-or-other/other/other-1.exheres-0
SUMMARY="other"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES=""
END

# upgrade-over-any
echo 'upgrade-over-any' >> metadata/categories.conf

mkdir -p 'packages/upgrade-over-any/target'
cat <<END > packages/upgrade-over-any/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    || ( upgrade-over-any/dep[>=2] upgrade-over-any/dep[<2] )
    "
END

mkdir -p 'packages/upgrade-over-any/dep'
cat <<END > packages/upgrade-over-any/dep/dep-2.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES=""
END

# no-active-labels
echo 'no-active-labels' >> metadata/categories.conf

mkdir -p 'packages/no-active-labels/target'
cat <<END > packages/no-active-labels/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    test-expensive: || ( no-active-labels/dep no-active-labels/dep )
    "
END

mkdir -p 'packages/no-active-labels/dep'
cat <<END > packages/no-active-labels/dep/dep-1.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES=""
END

cd ..