2025-04-12 07:13:54 +00:00
|
|
|
import logging
|
|
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
import oras.client
|
|
|
|
|
import oras.logger
|
|
|
|
|
|
|
|
|
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
|
|
|
|
|
|
from common import armbian_utils
|
|
|
|
|
|
|
|
|
|
# Prepare logging
|
|
|
|
|
armbian_utils.setup_logging()
|
|
|
|
|
log: logging.Logger = logging.getLogger("mapper-oci-up-to-date")
|
|
|
|
|
|
|
|
|
|
# Extra logging for ORAS library
|
|
|
|
|
oras.logger.setup_logger(quiet=(not armbian_utils.is_debug()), debug=(armbian_utils.is_debug()))
|
|
|
|
|
|
|
|
|
|
client = oras.client.OrasClient(insecure=False)
|
|
|
|
|
log.info(f"OCI client version: {client.version()}")
|
|
|
|
|
|
|
|
|
|
oci_target = "ghcr.io/armsurvivors/armbian-release/uboot-rockpro64-edge:2025.01-S6d41-P295c-Ha5a3-V9ecd-B1e5e-R448a"
|
|
|
|
|
|
2025-04-12 07:28:47 +00:00
|
|
|
container = client.get_container(oci_target)
|
|
|
|
|
manifest = client.get_manifest(container)
|
|
|
|
|
log.debug(f"Got manifest for existing '{oci_target}'.")
|