Skip to content

Commit ad4c2e0

Browse files
authored
Merge pull request #296 from foursixnine/mirror_variables
Add handling for MIRROR_* variables
2 parents a314147 + bfb96f4 commit ad4c2e0

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

script/cfg.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,14 @@ def openqa_call_repo0():
363363
FULLURL=1 \\\\"
364364
}'''
365365

366+
def openqa_call_repo_unconditional():
367+
return ''' echo " MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \\\\
368+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/REPO0_ISO \\\\
369+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/REPO0_ISO \\\\
370+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/REPO0_ISO \\\\
371+
FULLURL=1 \\\\"
372+
'''
373+
366374
openqa_call_repo0a = ' [ -z "FLAVORASREPOORS" ] || [ $( echo "$flavor" | grep -E -c "^(FLAVORASREPOORS)$" ) -eq 0 ] || '
367375

368376
openqa_call_repo0b = ' echo " REPO_0=REPO0_ISO \\\\"'

script/scriptgen.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ def gen_print_openqa(self, f):
10221022
)
10231023

10241024
imultiarch = 0
1025+
mirrorsalreadyadded = False
10251026
for repo in self.reposmultiarch:
10261027
destpath = repo.get("folder", repo.tag)
10271028
destpath = destpath.rstrip("/")
@@ -1041,6 +1042,9 @@ def gen_print_openqa(self, f):
10411042
" echo \" REPO_{}_SOURCE_PACKAGES='{}'\" \\\\".format(repo.tag.upper(), repo.get("source", "")), f
10421043
)
10431044
imultiarch = imultiarch + 1
1045+
if imultiarch > 0 and repo.get("mirror", 0) and not mirrorsalreadyadded:
1046+
self.p(cfg.openqa_call_repo_unconditional(), f, "REPO0_ISO", "{}-$buildex".format(dest))
1047+
mirrorsalreadyadded = True
10441048

10451049
if len(self.iso1) > 0:
10461050
self.p(' iso1=""', f)

t/obs/openSUSE:Leap:16.0:ToTest/print_openqa.before

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
CHECKSUM_ISO=$(cut -b-64 /var/lib/openqa/factory/other/agama-installer-Leap.aarch64-16.0.0-Leap-Build1.3.iso.sha256 | grep -E '[0-9a-f]{5,40}' | head -n1) \
66
DISTRI=opensuse \
77
FLAVOR=agama-installer-Leap \
8+
FULLURL=1 \
89
ISO=agama-installer-Leap.aarch64-16.0.0-Leap-Build1.3.iso \
10+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
11+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
12+
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
913
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
1014
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
1115
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
1216
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
1317
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
18+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
1419
VERSION=16.0 \
1520
_OBSOLETE=1
1621

@@ -21,12 +26,17 @@
2126
CHECKSUM_ISO=$(cut -b-64 /var/lib/openqa/factory/other/agama-installer-Leap.x86_64-16.0.0-Leap-Build1.3.iso.sha256 | grep -E '[0-9a-f]{5,40}' | head -n1) \
2227
DISTRI=opensuse \
2328
FLAVOR=agama-installer-Leap \
29+
FULLURL=1 \
2430
ISO=agama-installer-Leap.x86_64-16.0.0-Leap-Build1.3.iso \
31+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
32+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
33+
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
2534
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
2635
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
2736
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
2837
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
2938
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
39+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
3040
VERSION=16.0 \
3141
_OBSOLETE=1
3242

@@ -37,12 +47,17 @@
3747
CHECKSUM_ISO=$(cut -b-64 /var/lib/openqa/factory/other/agama-installer-Leap.ppc64le-16.0.0-Leap-Build1.3.iso.sha256 | grep -E '[0-9a-f]{5,40}' | head -n1) \
3848
DISTRI=opensuse \
3949
FLAVOR=agama-installer-Leap \
50+
FULLURL=1 \
4051
ISO=agama-installer-Leap.ppc64le-16.0.0-Leap-Build1.3.iso \
52+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
53+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
54+
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
4155
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
4256
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
4357
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
4458
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
4559
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
60+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
4661
VERSION=16.0 \
4762
_OBSOLETE=1
4863

@@ -53,12 +68,17 @@
5368
CHECKSUM_ISO=$(cut -b-64 /var/lib/openqa/factory/other/agama-installer-Leap.s390x-16.0.0-Leap-Build1.3.iso.sha256 | grep -E '[0-9a-f]{5,40}' | head -n1) \
5469
DISTRI=opensuse \
5570
FLAVOR=agama-installer-Leap \
71+
FULLURL=1 \
5672
ISO=agama-installer-Leap.s390x-16.0.0-Leap-Build1.3.iso \
73+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
74+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
75+
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
5776
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
5877
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
5978
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
6079
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
6180
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
81+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
6282
VERSION=16.0 \
6383
_OBSOLETE=1
6484

@@ -69,12 +89,17 @@
6989
CHECKSUM_ISO=$(cut -b-64 /var/lib/openqa/factory/other/Leap-16.0-offline-installer-aarch64-Build1.3.install.iso.sha256 | grep -E '[0-9a-f]{5,40}' | head -n1) \
7090
DISTRI=opensuse \
7191
FLAVOR=offline-installer \
92+
FULLURL=1 \
7293
ISO=Leap-16.0-offline-installer-aarch64-Build1.3.install.iso \
94+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
95+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
96+
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
7397
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
7498
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
7599
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
76100
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
77101
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
102+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
78103
VERSION=16.0 \
79104
_OBSOLETE=1
80105

@@ -85,12 +110,17 @@
85110
CHECKSUM_ISO=$(cut -b-64 /var/lib/openqa/factory/other/Leap-16.0-offline-installer-x86_64-Build1.3.install.iso.sha256 | grep -E '[0-9a-f]{5,40}' | head -n1) \
86111
DISTRI=opensuse \
87112
FLAVOR=offline-installer \
113+
FULLURL=1 \
88114
ISO=Leap-16.0-offline-installer-x86_64-Build1.3.install.iso \
115+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
116+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
117+
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
89118
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
90119
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
91120
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
92121
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
93122
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
123+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
94124
VERSION=16.0 \
95125
_OBSOLETE=1
96126

@@ -101,12 +131,17 @@
101131
CHECKSUM_ISO=$(cut -b-64 /var/lib/openqa/factory/other/Leap-16.0-offline-installer-ppc64le-Build1.3.install.iso.sha256 | grep -E '[0-9a-f]{5,40}' | head -n1) \
102132
DISTRI=opensuse \
103133
FLAVOR=offline-installer \
134+
FULLURL=1 \
104135
ISO=Leap-16.0-offline-installer-ppc64le-Build1.3.install.iso \
136+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
137+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
138+
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
105139
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
106140
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
107141
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
108142
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
109143
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
144+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
110145
VERSION=16.0 \
111146
_OBSOLETE=1
112147

@@ -117,12 +152,17 @@
117152
CHECKSUM_ISO=$(cut -b-64 /var/lib/openqa/factory/other/Leap-16.0-offline-installer-s390x-Build1.3.install.iso.sha256 | grep -E '[0-9a-f]{5,40}' | head -n1) \
118153
DISTRI=opensuse \
119154
FLAVOR=offline-installer \
155+
FULLURL=1 \
120156
ISO=Leap-16.0-offline-installer-s390x-Build1.3.install.iso \
157+
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
158+
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
159+
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
121160
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
122161
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
123162
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
124163
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
125164
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
165+
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
126166
VERSION=16.0 \
127167
_OBSOLETE=1
128168

0 commit comments

Comments
 (0)