From 08b1644a88bd67c12f7bbfbb57a19fb0983454f6 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Wed, 11 Nov 2026 14:53:22 +0100 Subject: [PATCH] fix: compare a held pin to its pin_build only Since 3129eaf10 a pin_build entry also names the build config_reads are read at, a revision of its own: ROCKNIX builds DuckStation 0.1-10998 while the profile pins the code at c9dc2254. The test held those to the profile's pin and read six profiles as disagreeing. advancemame, a held pin, still disagrees: its pin is moved on another branch. --- tests/test_pin_build.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_pin_build.py b/tests/test_pin_build.py index 029216664..1aa584e00 100644 --- a/tests/test_pin_build.py +++ b/tests/test_pin_build.py @@ -126,8 +126,10 @@ class HeldPinsReadTheirBuildFileAgain(unittest.TestCase): class EveryBuildReferenceNamesThePin(unittest.TestCase): """Reads the repository: a pin_build value is what the platform builds, - so it is the profile's source_commit or names its core_version, and the - platform's own YAML was scraped from that repository.""" + so on a pin_frozen profile it is the profile's source_commit or names + its core_version, and the platform's own YAML was scraped from that + repository. A pin_build standing for config_reads names the build those + reads are made at, a revision of its own (ROCKNIX's DuckStation).""" def test_the_values_agree(self): from common import load_emulator_profiles @@ -149,7 +151,7 @@ class EveryBuildReferenceNamesThePin(unittest.TestCase): token = value.split()[-1].rsplit("/", 1)[-1].removesuffix(".tar.gz") return value in pins or any(token in v or v in value for v in versions) - if not any(names_it(str(r["value"])) for r in references): + if profile.get("pin_frozen") and not any(names_it(str(r["value"])) for r in references): disagree.append(name) for reference in references: if not cf.pin_build_revision(reference, REPO_ROOT / "platforms"):