From a82b4aa6c82b72e9c70e848ff599e3f3910e804e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Fri, 11 Mar 2022 15:27:34 +0100 Subject: [PATCH] Get arch from config and not data when generating image (#3507) --- supervisor/addons/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/supervisor/addons/model.py b/supervisor/addons/model.py index 049057aaa..f50c7ea53 100644 --- a/supervisor/addons/model.py +++ b/supervisor/addons/model.py @@ -626,10 +626,11 @@ class AddonModel(CoreSysAttributes, ABC): """Generate image name from data.""" # Repository with Dockerhub images if ATTR_IMAGE in config: - return config[ATTR_IMAGE].format(arch=self.arch) + arch = self.sys_arch.match(config[ATTR_ARCH]) + return config[ATTR_IMAGE].format(arch=arch) # local build - return f"{config[ATTR_REPOSITORY]}/{self.arch}-addon-{config[ATTR_SLUG]}" + return f"{config[ATTR_REPOSITORY]}/{self.sys_arch.default}-addon-{config[ATTR_SLUG]}" def install(self) -> Awaitable[None]: """Install this add-on."""