canonical/cos-lib

add helper for discovering and aliasing system architecture

Aberta

#29 aberto em 17 de jun. de 2024

 (0 comentário) (0 reação) (0 responsável)Python (6 forks)auto 404
good first issue

Métricas do repositório

Stars
 (0 estrela)
Métricas de merge de PR
 (Mesclagem média 1d 5h) (1 fundiu PR em 30d)

Description

Several of our charms do something like this for architecture discovery:

        arch = platform.processor()
        if arch in ["x86_64", "amd64"]:
            self._arch = "amd64"
        elif arch in ["aarch64", "arm64", "armv8b", "armv8l"]:
            self._arch = "arm64"
        else:
            self._arch = arch

Examples (note that they don't all map to the same final arch alias names):

We should decide on one common method and include it here as a helper.

References:

Guia do colaborador