toolkit/mangle/generators/common.py

100 lines
3 KiB
Python
Raw Normal View History

2023-02-28 09:46:58 +00:00
import sys
2022-09-26 02:31:40 +00:00
class common:
2023-02-28 09:46:58 +00:00
def rlver(self, rlver, stream=False, all_repo=False):
2022-09-26 02:31:40 +00:00
default = "Not Supported"
2023-09-03 23:38:07 +00:00
if (stream and all_repo):
2023-02-28 09:46:58 +00:00
print("incompatible options used")
sys.exit(1)
if stream:
return getattr(self, 'c' + str(rlver) + 's', lambda: default)()
if all_repo:
return getattr(self, 'rl' + str(rlver) + 'all', lambda: default)()
2022-09-26 02:31:40 +00:00
return getattr(self, 'rl' + str(rlver), lambda: default)()
def rl8(self):
REPOS = {
'AppStream': ['aarch64', 'x86_64'],
'BaseOS': ['aarch64', 'x86_64'],
'HighAvailability': ['aarch64', 'x86_64'],
'PowerTools': ['aarch64', 'x86_64'],
'ResilientStorage': ['aarch64', 'x86_64'],
'RT': ['x86_64'],
}
return REPOS
def rl9(self):
REPOS = {
'AppStream': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'BaseOS': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'CRB': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'HighAvailability': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'NFV': ['x86_64'],
'ResilientStorage': ['ppc64le', 's390x', 'x86_64'],
'RT': ['x86_64'],
'SAP': ['ppc64le', 's390x', 'x86_64'],
'SAPHANA': ['ppc64le', 'x86_64']
}
return REPOS
2023-07-12 21:35:59 +00:00
def rl10(self):
REPOS = {
'AppStream': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'BaseOS': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'CRB': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'HighAvailability': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'NFV': ['x86_64'],
'RT': ['x86_64'],
'SAP': ['ppc64le', 's390x', 'x86_64'],
'SAPHANA': ['ppc64le', 'x86_64']
}
return REPOS
2023-09-03 23:38:07 +00:00
def rl8all(self):
REPOS = {
'dist-rocky8-lookahead-build': ['aarch64', 'x86_64', 'i386'],
}
return REPOS
2023-02-28 09:46:58 +00:00
def rl9all(self):
REPOS = {
'all': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
}
return REPOS
2023-07-12 21:35:59 +00:00
def rl10all(self):
REPOS = {
'all': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
}
return REPOS
2023-02-28 09:46:58 +00:00
# Parse tags of koji
def c8s(self):
REPOS = {
'c8s-build': ['aarch64', 'ppc64le', 'x86_64'],
}
return REPOS
def c9s(self):
REPOS = {
'c9s-build': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
}
return REPOS
2023-07-12 21:35:59 +00:00
def c10s(self):
REPOS = {
'c10s-build': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
}
return REPOS
2023-09-03 23:38:07 +00:00
def r8lh(self):
REPOS = {
'dist-rocky8-lookahead-build': ['aarch64', 'i386', 'x86_64'],
}
return REPOS
2022-09-26 02:31:40 +00:00
switcher = common()