From ccf61b96d7b560dfea3d9ea41a2a738bce260592 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Wed, 21 Oct 2026 10:26:04 +0200 Subject: [PATCH] fix: report names a RetroPie sentence gains flycast now reads naomi2.zip, which the RetroArch list RetroPie inherits already declares. The render added it to the flycast help sentences but landed_changes counted additions only for entries the platform layer lacks, so the report missed a name the diff carries. names_anew lets an exporter whose unit is not the entry say so. --- scripts/export_native.py | 4 ++++ scripts/exporter/base_exporter.py | 7 +++++++ scripts/exporter/retropie_exporter.py | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/scripts/export_native.py b/scripts/export_native.py index 1ccddb68..ccddee82 100644 --- a/scripts/export_native.py +++ b/scripts/export_native.py @@ -535,6 +535,10 @@ def landed_changes(exporter: object, systems: dict) -> LandedChanges: "added", entry, None, None, _added_fields(exporter, entry) )) continue + if entry.name and exporter.names_anew(entry): + records.append(_change( + "added", entry, None, None, _added_fields(exporter, entry) + )) # Asked of the exporter: a format that names each entry's cores # reads every entry of those cores, not only the paired one. if ( diff --git a/scripts/exporter/base_exporter.py b/scripts/exporter/base_exporter.py index 020f6a2e..b08f9866 100644 --- a/scripts/exporter/base_exporter.py +++ b/scripts/exporter/base_exporter.py @@ -155,6 +155,13 @@ class BaseExporter(ABC): the render learned from the platform's own file.""" return self.writable(fe) + def names_anew(self, fe: NativeFile) -> bool: + """Whether the render wrote, for the first time, a file the platform + layer already declares. Only a format whose unit is not the entry + does: a RetroPie help sentence can lack a name the inherited RetroArch + list carries.""" + return False + @classmethod def writable(cls, fe: NativeFile, require: str = "") -> bool: """Whether this format can carry the entry. diff --git a/scripts/exporter/retropie_exporter.py b/scripts/exporter/retropie_exporter.py index 802ad57f..0847f7a7 100644 --- a/scripts/exporter/retropie_exporter.py +++ b/scripts/exporter/retropie_exporter.py @@ -400,6 +400,11 @@ class Exporter(BaseExporter): return self.writable(fe) return id(fe) in getattr(self, "_named", set()) + def names_anew(self, fe: NativeFile) -> bool: + """flycast's naomi2.zip is in the RetroArch list RetroPie inherits, + yet no flycast help sentence named it: the render adds it there.""" + return fe.platform is not None and id(fe) in getattr(self, "_named", set()) + def outcome( self, systems: dict[str, NativeSystem],