Skip to content

Commit 9399cef

Browse files
committed
Check that MIRROR_* variables are added only once
In the case of multiple repos, avoid defining the mirror variables multiple times
1 parent b87ee4c commit 9399cef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

script/scriptgen.py

Lines changed: 3 additions & 1 deletion
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,8 +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
1044-
if imultiarch > 0:
1045+
if imultiarch > 0 and repo.get("mirror", 1) and not mirrorsalreadyadded:
10451046
self.p(cfg.openqa_call_repo_unconditional(), f, "REPO0_ISO", "{}-$buildex".format(dest))
1047+
mirrorsalreadyadded = True
10461048

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

0 commit comments

Comments
 (0)