Skip to content

Add handling for MIRROR_* variables #296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions script/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,14 @@ def openqa_call_repo0():
FULLURL=1 \\\\"
}'''

def openqa_call_repo_unconditional():
return ''' echo " MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \\\\
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/REPO0_ISO \\\\
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/REPO0_ISO \\\\
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/REPO0_ISO \\\\
FULLURL=1 \\\\"
'''

openqa_call_repo0a = ' [ -z "FLAVORASREPOORS" ] || [ $( echo "$flavor" | grep -E -c "^(FLAVORASREPOORS)$" ) -eq 0 ] || '

openqa_call_repo0b = ' echo " REPO_0=REPO0_ISO \\\\"'
Expand Down
4 changes: 4 additions & 0 deletions script/scriptgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ def gen_print_openqa(self, f):
)

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

if len(self.iso1) > 0:
self.p(' iso1=""', f)
Expand Down
40 changes: 40 additions & 0 deletions t/obs/openSUSE:Leap:16.0:ToTest/print_openqa.before
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
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) \
DISTRI=opensuse \
FLAVOR=agama-installer-Leap \
FULLURL=1 \
ISO=agama-installer-Leap.aarch64-16.0.0-Leap-Build1.3.iso \
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
VERSION=16.0 \
_OBSOLETE=1

Expand All @@ -21,12 +26,17 @@
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) \
DISTRI=opensuse \
FLAVOR=agama-installer-Leap \
FULLURL=1 \
ISO=agama-installer-Leap.x86_64-16.0.0-Leap-Build1.3.iso \
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
VERSION=16.0 \
_OBSOLETE=1

Expand All @@ -37,12 +47,17 @@
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) \
DISTRI=opensuse \
FLAVOR=agama-installer-Leap \
FULLURL=1 \
ISO=agama-installer-Leap.ppc64le-16.0.0-Leap-Build1.3.iso \
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
VERSION=16.0 \
_OBSOLETE=1

Expand All @@ -53,12 +68,17 @@
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) \
DISTRI=opensuse \
FLAVOR=agama-installer-Leap \
FULLURL=1 \
ISO=agama-installer-Leap.s390x-16.0.0-Leap-Build1.3.iso \
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
VERSION=16.0 \
_OBSOLETE=1

Expand All @@ -69,12 +89,17 @@
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) \
DISTRI=opensuse \
FLAVOR=offline-installer \
FULLURL=1 \
ISO=Leap-16.0-offline-installer-aarch64-Build1.3.install.iso \
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
VERSION=16.0 \
_OBSOLETE=1

Expand All @@ -85,12 +110,17 @@
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) \
DISTRI=opensuse \
FLAVOR=offline-installer \
FULLURL=1 \
ISO=Leap-16.0-offline-installer-x86_64-Build1.3.install.iso \
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
VERSION=16.0 \
_OBSOLETE=1

Expand All @@ -101,12 +131,17 @@
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) \
DISTRI=opensuse \
FLAVOR=offline-installer \
FULLURL=1 \
ISO=Leap-16.0-offline-installer-ppc64le-Build1.3.install.iso \
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
VERSION=16.0 \
_OBSOLETE=1

Expand All @@ -117,12 +152,17 @@
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) \
DISTRI=opensuse \
FLAVOR=offline-installer \
FULLURL=1 \
ISO=Leap-16.0-offline-installer-s390x-Build1.3.install.iso \
MIRROR_HTTP=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_HTTPS=https://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
MIRROR_PREFIX=http://openqa.opensuse.org/assets/repo \
REPO_0=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_1=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
REPO_LEAP_OSS_DEBUG=Leap-16.0-aarch64-ppc64le-s390x-x86_64-Debug-Build1.3 \
REPO_LEAP_OSS_DEBUG_PACKAGES='{java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*}' \
SUSEMIRROR=http://openqa.opensuse.org/assets/repo/Leap-16.0-aarch64-ppc64le-s390x-x86_64-Build1.3 \
VERSION=16.0 \
_OBSOLETE=1