Skip to content

Commit cebe04f

Browse files
committed
make riscv an option
1 parent f19448d commit cebe04f

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

mangle/koji/branch_tag.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
parser.add_argument('--major', type=str, required=True)
1010
parser.add_argument('--minor', type=str, required=True,
1111
choices=('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'))
12+
parser.add_argument('--riscv', action='store_true')
1213

1314
results = parser.parse_args()
1415
MAJOR = results.major
1516
MINOR = results.minor
17+
RISCV = results.riscv
1618
RELEASE = f'{MAJOR}.{MINOR}'
1719
PREFIX = f'dist-rocky{RELEASE}'
1820
TOOLS = f'dist-rocky{MAJOR}-build-tools'
@@ -24,10 +26,10 @@
2426
# things like noarch_arches or even mock.new_chroot (e.g. for kiwi).
2527
DEFAULT_EXTRA = {'repo.auto': True}
2628
UPDATES = {'rpm.macro.distcore': f'.el{MAJOR}_{MINOR}'}
27-
RISCV = {'noarch_arches': 'riscv64'}
29+
RISCV_NOARCH = {'noarch_arches': 'riscv64'}
2830
UPDATES_EXTRA = {**DEFAULT_EXTRA, **UPDATES}
29-
RISCV_EXTRA = {**DEFAULT_EXTRA, **RISCV}
30-
RISCV_UPDATES_EXTRA = {**UPDATES_EXTRA, **RISCV}
31+
RISCV_EXTRA = {**DEFAULT_EXTRA, **RISCV_NOARCH}
32+
RISCV_UPDATES_EXTRA = {**UPDATES_EXTRA, **RISCV_NOARCH}
3133
KIWI = {**DEFAULT_EXTRA, 'mock.new_chroot': 0}
3234

3335
# RelEng: riscv64 has separate build tags until we have more hardware or
@@ -40,15 +42,6 @@
4042
f'{PREFIX}-updates': {
4143
'build': f'{PREFIX}-updates-build', 'dest': f'{PREFIX}',
4244
'extra': UPDATES_EXTRA},
43-
f'{PREFIX}-build-riscv64': {
44-
'build': f'{PREFIX}-build-riscv64', 'dest': f'{PREFIX}',
45-
'extra': RISCV_EXTRA,
46-
'arches': 'riscv64'},
47-
f'{PREFIX}-updates-riscv64': {
48-
'build': f'{PREFIX}-updates-build-riscv64', 'dest': f'{PREFIX}',
49-
'extra': RISCV_UPDATES_EXTRA,
50-
'arches': 'riscv64'},
51-
5245
# Kiwi build tags
5346
f'{PREFIX}-kiwi': {
5447
'build': f'{PREFIX}-kiwi', 'dest': f'{PREFIX}',
@@ -92,6 +85,20 @@
9285
'build': f'{PREFIX}-kiwi-nspawn', 'dest': f'{PREFIX}'},
9386
}
9487

88+
RISCV_TARGETS = {
89+
f'{PREFIX}-build-riscv64': {
90+
'build': f'{PREFIX}-build-riscv64', 'dest': f'{PREFIX}',
91+
'extra': RISCV_EXTRA,
92+
'arches': 'riscv64'},
93+
f'{PREFIX}-updates-riscv64': {
94+
'build': f'{PREFIX}-updates-build-riscv64', 'dest': f'{PREFIX}',
95+
'extra': RISCV_UPDATES_EXTRA,
96+
'arches': 'riscv64'},
97+
}
98+
99+
if RISCV:
100+
TARGETS.update(RISCV_TARGETS)
101+
95102
session = koji.ClientSession('https://kojidev.rockylinux.org/kojihub')
96103
try:
97104
session.gssapi_login()

0 commit comments

Comments
 (0)