From 5109869c73abe6a78319c33ca1aac96ba9a6826e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= Date: Mon, 13 Nov 2023 08:42:02 +0100 Subject: [PATCH] screenshots: Check screenshots branch for each arch --- flatpak_builder_lint/checks/screenshots.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flatpak_builder_lint/checks/screenshots.py b/flatpak_builder_lint/checks/screenshots.py index 6a3eb209..077d5a09 100644 --- a/flatpak_builder_lint/checks/screenshots.py +++ b/flatpak_builder_lint/checks/screenshots.py @@ -37,7 +37,6 @@ def check_repo(self, path: str) -> None: if not os.path.exists(appstream_path): self.errors.add("appstream-missing-appinfo-file") - # import ipdb; ipdb.set_trace() root = etree.parse(appstream_path) components = root.xpath("/components/component") @@ -54,9 +53,11 @@ def check_repo(self, path: str) -> None: self.errors.add("appstream-missing-screenshots") return - if "screenshots/x86_64" not in refs: - self.errors.add("appstream-screenshots-not-mirrored") - return + arches = {ref.split("/")[2] for ref in refs} + for arch in arches: + if f"screenshots/{arch}" not in refs: + self.errors.add("appstream-screenshots-not-mirrored") + return ostree_screenshots_cmd = ostree.cli(path, "ls", "-R", "screenshots/x86_64") if ostree_screenshots_cmd["returncode"] != 0: