Skip to content

Commit cbe31a7

Browse files
committed
Add xml attribute ln_iso_to_repo
It is needed for agama s390x to overcome architectural limitations
1 parent 7b008f1 commit cbe31a7

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

script/cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def rsync_commands(checksum):
8080
mkdir /var/lib/openqa/factory/repo/$repo0folder
8181
bsdtar xf /var/lib/openqa/factory/iso/$dest -C /var/lib/openqa/factory/repo/$repo0folder
8282
}"
83+
[ -z "FLAVORTOREPOORS" ] || [ $( echo "$flavor" | grep -E -c "^(FLAVORTOREPOORS)$" ) -eq 0 ] || echo "cp -l /var/lib/openqa/factory/iso/$dest /var/lib/openqa/factory/openqa/factory/repo/"
8384
done
8485
done'''
8586

script/scriptgen.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ def __init__(self, name, actionGenerator):
168168
self.fixed_iso = ""
169169
self.mask = ""
170170
self.iso_extract_as_repo = {}
171+
self.ln_iso_to_repo = {}
171172
self.mirror_repo = ""
172173
self.repos = []
173174
self.repolink = ""
@@ -276,6 +277,7 @@ def p(
276277
s = s.replace("FLAVORORS", "|".join(self.flavors))
277278
s = s.replace("FLAVORALIASLIST", ",".join(aliases))
278279
s = s.replace("FLAVORASREPOORS", "|".join([f for f in self.flavors if self.iso_extract_as_repo.get(f, 0)]))
280+
s = s.replace("FLAVORTOREPOORS", "|".join([f for f in self.flavors if self.ln_iso_to_repo.get(f, 0)]))
279281

280282
if self.repos or (self.repolink and not "/" in self.repolink):
281283
repos = self.repos.copy()
@@ -354,6 +356,8 @@ def doFlavor(self, node):
354356
self.iso_extract_as_repo[iso] = 1
355357
self.repo0folder = node.attrib["extract_as_repo"]
356358
self.isos.append(iso)
359+
if node.attrib.get("ln_iso_to_repo", ""):
360+
self.ln_iso_to_repo[iso] = node.attrib["ln_iso_to_repo"]
357361

358362
if node.attrib.get("name", "") and node.attrib.get("folder", ""):
359363
self.iso_folder[node.attrib["name"]] = node.attrib["folder"]
@@ -1049,6 +1053,8 @@ def gen_print_openqa(self, f):
10491053
s = cfg.openqa_call_repo0b
10501054
destiso = self.fixed_iso[:-4]
10511055
self.p(s, f, "REPO0_ISO", destiso)
1056+
if self.ln_iso_to_repo.get(iso, 0):
1057+
self.p(s, f, "REPO_0", "REPO_999", "REPO0_ISO", destiso + '.iso')
10521058
if self.iso_5:
10531059
pref = self.iso_5.replace("-", "_").rstrip("_DVD")
10541060
self.p(cfg.openqa_call_repo5, f, "REPOALIAS", "SLE_{}".format(pref))

t/obs/systemsmanagement:Agama:Devel/s390x/print_openqa.before

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/agama-installer.s390x-9.0.0-openSUSE-Build17.9 \
1212
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
1313
REPO_0=agama-installer.s390x-9.0.0-openSUSE-Build17.9 \
14+
REPO_999=agama-installer.s390x-9.0.0-openSUSE-Build17.9.iso \
1415
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/agama-installer.s390x-9.0.0-openSUSE-Build17.9 \
1516
VERSION=agama-9.0 \
1617
_OBSOLETE=1

t/obs/systemsmanagement:Agama:Devel/s390x/print_rsync_iso.before

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ rsync --timeout=3600 -tlp4 --specials obspublish-other::openqa/systemsmanagement
44
mkdir /var/lib/openqa/factory/repo/agama-installer.s390x-9.0.0-openSUSE-Build17.9
55
bsdtar xf /var/lib/openqa/factory/iso/agama-installer.s390x-9.0.0-openSUSE-Build17.9.iso -C /var/lib/openqa/factory/repo/agama-installer.s390x-9.0.0-openSUSE-Build17.9
66
}
7+
cp -l /var/lib/openqa/factory/iso/agama-installer.s390x-9.0.0-openSUSE-Build17.9.iso /var/lib/openqa/factory/openqa/factory/repo/

xml/obs/systemsmanagement:Agama:Devel.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<flavor name="agama-installer" folder="images/*/agama-installer:openSUSE/" iso="1" media1="0"/>
88
</batch>
99
<batch name="s390x" archs="s390x">
10-
<flavor name="agama-installer" folder="images/*/agama-installer:openSUSE/" iso="extract_as_repo" media1="0"/>
10+
<flavor name="agama-installer" folder="images/*/agama-installer:openSUSE/" iso="extract_as_repo" ln_iso_to_repo="1" media1="0"/>
1111
</batch>
1212
</openQA>

0 commit comments

Comments
 (0)