From 5621737c2917bf6984b9adc6e8f7bccd1ff0b8fc Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 6 Nov 2026 04:32:04 +0100 Subject: [PATCH] fix: name an emulator's packs once per page A Packed line on each file card put the MAME parts, BizHawk, blueMSX, FBNeo and GroovyMAME over the 10,000 element budget. The Run by row of the page already names the setups that pack the emulator's files. --- scripts/generate_site.py | 11 +++-------- tests/test_site_emulators.py | 10 ++++------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/scripts/generate_site.py b/scripts/generate_site.py index b6f344cfe..ebe4c6cf4 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -6354,7 +6354,7 @@ def search_excluded(lines: list[str]) -> list[str]: SEARCH_SKIPPED = ( "- SHA1:", "- MD5:", "- CRC32:", "- SHA256:", "- Adler32", "- Size:", "- Validation", "- Priority:", "- Contents (", - "- Platforms:", "- Packed for its emulators by:", "- Source:", "- Asked for by:", + "- Platforms:", "- Source:", "- Asked for by:", "- Collection path:", "- Collection copy:", "- Collection copies:", "- Installed by the platform's own package on:", "- Not in the platform's package", "- Never opened on these platforms", @@ -8391,13 +8391,6 @@ def _render_emulator_file( details.append("Platforms: " + ". ".join(places)) elif plat_links: details.append(f"Platforms: {', '.join(plat_links)}") - # The packs that carry the file for their emulators, as the system - # card says: handy's lynxboot.img named every setup but EmuDeck, - # ROCKNIX and NextUI, which install it for the core. - packed = _installed_places( - sha1, consumers, set(consumers.platforms.get(sha1, ()))) if sha1 else [] - if packed: - details.append("Packed for its emulators by: " + ". ".join(_places_markdown(packed))) if dest and dest != fname and dest != fpath: details.append(f"Destination: `{dest}`") @@ -10136,6 +10129,8 @@ def emulator_pages( if setups: # The file cards name the setups whose own list holds a file: the # ones that run the emulator and pack its files were said nowhere. + # Said once here: a line on each card put MAME's parts and four + # other pages over their element budget. lines.append("| Run by | " + ", ".join( f"[{_platform_display(p)}](../platforms/{p}.md)" for p in setups) + " |") lines.append(f"| Profiled | {profiled} |") diff --git a/tests/test_site_emulators.py b/tests/test_site_emulators.py index 03f59f620..2fde18825 100644 --- a/tests/test_site_emulators.py +++ b/tests/test_site_emulators.py @@ -764,8 +764,9 @@ class SmallFixes(unittest.TestCase): class AnEmulatorPageNamesItsSetups(unittest.TestCase): - """emulators/handy named no setup that runs Handy, and its lynxboot.img - card left out EmuDeck, ROCKNIX and NextUI, which pack it for the core.""" + """emulators/handy named no setup that runs Handy: its lynxboot.img card + names the setups whose own list holds it, not EmuDeck, ROCKNIX and + NextUI, which pack it for the core.""" def test_setups_come_from_the_core_resolution(self): coverages = { @@ -776,7 +777,7 @@ class AnEmulatorPageNamesItsSetups(unittest.TestCase): profiles = {"handy": {"type": "libretro"}, "other": {"type": "libretro"}} self.assertEqual(gs.emulator_setups(coverages, profiles)["handy"], ["a", "b"]) - def test_the_page_carries_both(self): + def test_the_page_names_them(self): from tests import sitepages # noqa: PLC0415 sitepages.require() @@ -784,9 +785,6 @@ class AnEmulatorPageNamesItsSetups(unittest.TestCase): row = next(line for line in text.splitlines() if line.startswith("| Run by |")) for setup in ("emudeck", "rocknix", "nextui", "retroarch"): self.assertIn(f"/platforms/{setup}/", row) - card = text.split("lynxboot.img", 1)[1].split("\n- Packed for its emulators by:", 1) - self.assertEqual(len(card), 2) - self.assertIn("EmuDeck", card[1].splitlines()[0]) class SizesTheCodeComparesAreExact(unittest.TestCase):