Skip to content
Snippets Groups Projects
Unverified Commit 801437e6 authored by Casey's avatar Casey :recycle: Committed by Oliver Smith
Browse files

core: Arch: add .supported_binary() (MR 2474)


The .supported() method errs on the side of exposing too many
architectures to make porting for new or less-common platforms easier.

It therefore isn't suitable for using as a list of supported
architectures we can probe the binary repository for.

Introduce a .supported_binary() method to export only the architectures
where we have a binary repository.

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
parent c74735ea
No related branches found
No related tags found
1 merge request!2474build: fix cross-compilation with abuild (introducing pmb:cross-native2)
......@@ -94,6 +94,18 @@ class Arch(enum.Enum):
]
)
# FIXME: we should use pmaports.cfg "supported_arches" instead
@staticmethod
def supported_binary() -> set[Arch]:
"""Officially supported architectures that have a binary repository"""
return {
Arch.armhf,
Arch.armv7,
Arch.aarch64,
Arch.x86_64,
Arch.x86,
}
def kernel(self) -> str:
match self:
case Arch.x86:
......
......@@ -168,7 +168,7 @@ def update(arch: Arch | None = None, force: bool = False, existing_only: bool =
return False
# Architectures and retention time
architectures = [arch] if arch else Arch.supported()
architectures = [arch] if arch else Arch.supported_binary()
retention_hours = pmb.config.apkindex_retention_time
retention_seconds = retention_hours * 3600
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment