From 3e0052feb93f01b6bf286a6a993c6c74bac183e2 Mon Sep 17 00:00:00 2001 From: Jesse Schwartzentruber Date: Wed, 22 Oct 2025 16:28:05 -0400 Subject: [PATCH 1/2] feat: add linux32- to the search space for taskcluster indexed builds --- src/fuzzfetch/models.py | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/fuzzfetch/models.py b/src/fuzzfetch/models.py index 87486a77..60a8dcce 100644 --- a/src/fuzzfetch/models.py +++ b/src/fuzzfetch/models.py @@ -8,7 +8,7 @@ from dataclasses import dataclass, fields from datetime import datetime from enum import Enum -from itertools import product +from itertools import chain, product from logging import getLogger from platform import machine as plat_machine from platform import system as plat_system @@ -232,6 +232,18 @@ def generate_task_paths( task_path = f"/task/{build}" task_template_paths = ((cls.TASKCLUSTER_API, task_path),) + if target_platform == "linux": + old_template_paths = tuple(task_template_paths) + task_template_paths = tuple( + chain( + old_template_paths, + [ + (api, task_path.replace("linux-", "linux32-")) + for (api, task_path) in old_template_paths + ], + ) + ) + for template_path, try_wo_opt in product(task_template_paths, (False, True)): template, path = template_path @@ -427,10 +439,14 @@ def from_platform_guess(cls, build_string: str) -> Platform: match: list[str] = [] for system, platform in cls.SUPPORTED.items(): for machine, platform_guess in platform.items(): - if platform_guess in build_string and ( - not match or len(match[2]) < len(platform_guess) - ): - match = [system, machine, platform_guess] + platform_guesses = [platform_guess] + if platform_guess == "linux": + platform_guesses.append("linux32") + for platform_guess in platform_guesses: + if platform_guess in build_string and ( + not match or len(match[2]) < len(platform_guess) + ): + match = [system, machine, platform_guess] if match: return cls(match[0], match[1]) raise FetcherException(f"Could not extract platform from {build_string}") From 71f5fdd65e263e5df7e8ef20a63aedb0afea43dc Mon Sep 17 00:00:00 2001 From: Jesse Schwartzentruber Date: Fri, 24 Oct 2025 10:50:08 -0400 Subject: [PATCH 2/2] test: add linux32 alias test --- tests/test_models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_models.py b/tests/test_models.py index 05697359..d5de049d 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -142,6 +142,8 @@ def test_platform_initialization_unsupported_machine(): ("linux64", ("Linux", "x86_64", "linux64")), ("win64-aarch64", ("Windows", "arm64", "win64-aarch64")), ("android-aarch64", ("Android", "arm64", "android-aarch64")), + ("linux32", ("Linux", "x86", "linux")), + ("linux", ("Linux", "x86", "linux")), ], ) def test_from_platform_guess(build_string, expected):