fix: a platform's own data trees leave its pack

The platform layer names data trees for its systems: retroarch.yml carries dolphin-sys and ppsspp-assets, and Lakka inherits them, while Lakka's core packages install both trees into the system directory. A profile records that with installed_on on its data directory, and the pack and the install manifest now leave those trees out for that platform.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 06:36:32 +02:00
1 parent 4227aee9b4
commit 6df087e3e9
3 files changed
+40

No files matched your search

+18
View File
@@ -1779,6 +1779,24 @@ def source_yaml_paths(directory: str | Path) -> list[Path]:
]
def installed_data_refs(platform: str, emulators_dir: str = "") -> frozenset[str]:
"""Data directories a platform's own packages install beside the cores.
The platform layer names trees for its systems (retroarch.yml carries
dolphin-sys and ppsspp-assets, and Lakka inherits them), while Lakka's
core packages put both into the system directory themselves. A profile
records that with installed_on on its data directory reference.
"""
emulators_dir = emulators_dir or os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "emulators")
return frozenset(
str(tree.get("ref", ""))
for profile in load_emulator_profiles(emulators_dir, skip_aliases=False).values()
for tree in profile.get("data_directories") or []
if isinstance(tree, dict) and platform in (tree.get("installed_on") or [])
)
def load_emulator_profiles(
emulators_dir: str,
skip_aliases: bool = True,
+3
View File
@@ -33,6 +33,7 @@ from pathlib import Path
sys.path.insert(0, os.path.dirname(__file__))
from common import resolve_platform_cores as _platform_cores
from common import (
installed_data_refs,
platform_arg,
require_directory,
target_listing_line,
@@ -400,6 +401,8 @@ def _data_directory_members(
ref_key = dd.get("ref", "")
if not ref_key or not data_registry or ref_key not in data_registry:
continue
if ref_key in installed_data_refs(platform_name):
continue
entry = data_registry[ref_key]
allowed = entry.get("for_platforms")
if allowed and platform_name not in allowed: