fix: write retrodeck repeats to each component

duckstation and retroarch both list the PS1 BIOS with one md5, and the
entry was filed under the first component read: an export correction
reached duckstation's manifest and left retroarch's line as it was.
component now lists every component that repeats an entry (a string for
one), and the exporter writes the entry back to each. A repeat is the
same name, path, hashes, native system and requirement: MAME's and
FBNeo's cchip.zip, or two required labels, stay two entries, since an
export corrects a line by its system and writes its requirement back.
Rescraped at components fcd0d729: 73 entries list two components, 9
come back as their own entries. install/retrodeck.json is unchanged.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 21:04:19 +01:00
1 parent e8704a793e
commit 3779f07bb5
8 files changed
+433 -104

No files matched your search

+4 -2
View File
@@ -9,7 +9,7 @@ from typing import TYPE_CHECKING, TypedDict
from core.paths import BIOS_DIR, EMULATORS_DIR, declared_destination
from core.ziptools import build_zip_contents_index
from model.alternatives import core_file_spares
from model.declarations import OUTER_ROOTS, platform_declarations
from model.declarations import OUTER_ROOTS, declared_components, platform_declarations
from model.profiles import lists_files, load_emulator_profiles
from model.systems import select_systems
from packs import slots
@@ -252,7 +252,9 @@ def _expects(entry: dict) -> str:
def _side(sys_id: str, entry: dict) -> str:
"""One declaration named by the platform's own system, or its component."""
native = entry.get("native_system") or entry.get("component")
native = entry.get("native_system") or ", ".join(
declared_components(entry.get("component"))
)
return f"{sys_id} ({native})" if native else sys_id