mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: one core name per RetroPie package
The platform scraper kept lr-dosbox-pure as dosbox-pure, which matched the standalone DOSBox Pure Unleashed profile, while the target scraper wrote dosbox_pure. Both now read core_name(), and platforms/retropie.yml is rescraped at its pinned revision 46128cd2: only the libretro core names change, and six Unleashed files leave the RetroPie manifest.
This commit is contained in:
1 parent
39e6afbeb2
commit
87f6211983
5 files changed
+67
-110
No files matched your search
@@ -56,6 +56,18 @@ _VERSION = re.compile(r'^__version="([^"]+)"', re.MULTILINE)
|
||||
_PACKAGE_DIRS = _SCRIPT_SECTIONS
|
||||
|
||||
|
||||
def core_name(module_id: str) -> str:
|
||||
"""The core a RetroPie package installs, as the buildbot names it.
|
||||
|
||||
A libretro package is lr-<core> with the name hyphenated (lr-beetle-psx
|
||||
builds beetle_psx). A standalone package keeps its id (dosbox-staging).
|
||||
The platform and target scrapers both read it here.
|
||||
"""
|
||||
if module_id.startswith("lr-"):
|
||||
return module_id[3:].replace("-", "_")
|
||||
return module_id
|
||||
|
||||
|
||||
class Scraper(BaseScraper):
|
||||
"""Scraper for the RetroPie package list."""
|
||||
|
||||
@@ -148,10 +160,13 @@ class Scraper(BaseScraper):
|
||||
libretro cores and reads the same files, at BIOS/ instead of
|
||||
system/. Only the core list is its own.
|
||||
"""
|
||||
# A libretro package is lr-<core>; a standalone package is named
|
||||
# after the emulator itself.
|
||||
# A libretro package is lr-<core> with the buildbot name hyphenated
|
||||
# (lr-dosbox-pure builds dosbox_pure), as the target scraper reads
|
||||
# it; a standalone package is named after the emulator itself.
|
||||
# Kept hyphenated, lr-dosbox-pure named dosbox-pure, the standalone
|
||||
# DOSBox Pure Unleashed build RetroPie does not ship.
|
||||
modules = self.module_ids()
|
||||
cores = sorted({module.removeprefix("lr-") for module in modules})
|
||||
cores = sorted({core_name(m) for m in modules})
|
||||
libretro = {m.removeprefix("lr-") for m in modules if m.startswith("lr-")}
|
||||
# The retroarch package is the frontend that runs the lr- cores.
|
||||
standalone = sorted(
|
||||
|
||||
@@ -19,6 +19,7 @@ from datetime import datetime, timezone
|
||||
|
||||
import yaml
|
||||
|
||||
from ..retropie_scraper import core_name
|
||||
from . import BaseTargetScraper
|
||||
|
||||
PLATFORM_NAME = "retropie"
|
||||
@@ -158,15 +159,10 @@ class Scraper(BaseTargetScraper):
|
||||
if not module_id:
|
||||
print(f" warning: no rp_module_id in {filename}", file=sys.stderr)
|
||||
continue
|
||||
# A libretro package is lr-<core> with the buildbot name hyphenated
|
||||
# (lr-beetle-psx -> beetle_psx), and a standalone package keeps the id
|
||||
# the platform list carries (dosbox-staging).
|
||||
core_name = module_id
|
||||
if core_name.startswith("lr-"):
|
||||
core_name = core_name[3:].replace("-", "_")
|
||||
# The platform scraper names the package the same way.
|
||||
for platform in PLATFORM_FLAGS:
|
||||
if _is_available(flags, platform):
|
||||
platform_cores[platform].add(core_name)
|
||||
platform_cores[platform].add(core_name(module_id))
|
||||
|
||||
print(f" parsed {len(filenames)} scriptmodules", file=sys.stderr)
|
||||
|
||||
|
||||
Reference in new issue
Block a user