Skip to content

Commit b3badc7

Browse files
committed
Add missing archs to allowed_archs_as_regex_str
The `chroot_pattern` in `config.py` couldn't be filtered to remove `riscv64` and `x86_64_v2` chroots before this patch because it thought that those were unknown architectures.
1 parent cac9ce5 commit b3badc7

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

  • snapshot_manager/snapshot_manager

snapshot_manager/snapshot_manager/util.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def allowed_archs_as_regex_str() -> str:
272272
Example:
273273
274274
>>> allowed_archs_as_regex_str()
275-
'(aarch64|i386|ppc64le|s390x|x86_64)'
275+
'(aarch64|i386|ppc64le|s390x|x86_64|riscv64|x86_64_v2)'
276276
"""
277277
return "(" + "|".join(allowed_archs()) + ")"
278278

@@ -305,6 +305,12 @@ def expect_chroot(chroot: str) -> str:
305305
>>> expect_chroot("centos-stream-10-x86_64")
306306
'centos-stream-10-x86_64'
307307
308+
>>> expect_chroot("fedora-42-riscv64")
309+
'fedora-42-riscv64'
310+
311+
>>> expect_chroot("centos-stream-10-x86_64_v2")
312+
'centos-stream-10-x86_64_v2'
313+
308314
>>> expect_chroot("fedora-rawhide-")
309315
Traceback (most recent call last):
310316
...
@@ -466,6 +472,12 @@ def chroot_arch(chroot: str) -> str:
466472
>>> chroot_arch(chroot="fedora-40-ppc64le")
467473
'ppc64le'
468474
475+
>>> chroot_arch(chroot="fedora-42-riscv64")
476+
'riscv64'
477+
478+
>>> chroot_arch(chroot="fedora-42-x86_64_v2")
479+
'x86_64_v2'
480+
469481
>>> chroot_arch(chroot="fedora-rawhide-NEWARCH")
470482
Traceback (most recent call last):
471483
...

0 commit comments

Comments
 (0)