fix: list only what an emuelec image carries

The 29 port engines depend on emuelec-ports, which no package of a
released image depends on, and flycast-dojo is in no device list: the
targets scraper already says so (UNBUILT). The platform list and the
launcher records now hold what at least one device image carries. Each
system keeps the list es_systems.json gives it, which says whose files
its entries ask for: VVVVVV's data.zip is still never served xrick's.
This commit is contained in:
Abdessamad Derraz committed 2026-11-09 21:27:38 +01:00
1 parent 0aa551dba7
commit ebba4c9c89
5 files changed
+38 -74

No files matched your search

-69
View File
@@ -11,56 +11,38 @@ cores:
- "81"
- AMIBERRY
- AdvanceMame
- CGeniusExe
- Chocolate-Doom
- DOSBOXSDL2
- Duckstation
- ECWolf
- FBNEOSA
- GZDoom
- HATARISA
- HYPSEUS
- LZDoom
- OPENBOR
- OpenJazz
- PPSSPPSDL
- Pico-8
- RigelEngine
- SCUMMVMSA
- STELLASA
- Solarus
- VVVVVV
- a5200
- abuse
- atari800
- bgdi
- bk
- bluemsx
- bs
- bstone
- cannonball
- cap32
- ccleste
- cdogs-sdl
- daphne
- devilutionx
- dinothawr
- dolphin
- dosbox_pure
- dosbox_svn
- easyrpg
- eduke32
- fake08
- fallout-ce
- fallout2-ce
- fbalpha2012
- fbneo
- fceumm
- fceumm_mod
- fheroes2
- flycast
- flycast_32b
- flycast_dojo
- flycastsa
- fmsx
- freeintv
@@ -80,9 +62,6 @@ cores:
- gw
- handy
- hatari
- hcl
- hode
- hurrican
- ikemen
- jzintv
- mame
@@ -111,7 +90,6 @@ cores:
- np2kai
- nxengine
- o2em
- opentyrian
- opera
- parallel_n64_32b
- pcsx_rearmed
@@ -121,7 +99,6 @@ cores:
- pokemini
- potator
- prboom
- prince
- prosystem
- puae
- puae2021
@@ -131,17 +108,11 @@ cores:
- sameboy
- sameduck
- scummvm
- smw
- snes9x
- snes9x2002
- snes9x2005_plus
- snes9x2010
- sonic2013
- soniccd
- sonicmania
- stella
- supertux2
- supertuxkart
- swanstation
- tgbdual
- tic80
@@ -158,60 +129,29 @@ cores:
- vice_xvic
- virtualjaguar
- x1
- xash3d
- xrick
- yabasanshiro
standalone_cores:
- AMIBERRY
- AdvanceMame
- CGeniusExe
- Chocolate-Doom
- DOSBOXSDL2
- Duckstation
- ECWolf
- FBNEOSA
- GZDoom
- HATARISA
- HYPSEUS
- LZDoom
- OPENBOR
- OpenJazz
- PPSSPPSDL
- Pico-8
- RigelEngine
- SCUMMVMSA
- STELLASA
- Solarus
- VVVVVV
- abuse
- bgdi
- bs
- bstone
- ccleste
- cdogs-sdl
- devilutionx
- dolphin
- eduke32
- fallout-ce
- fallout2-ce
- fheroes2
- flycast_dojo
- flycastsa
- hcl
- hode
- hurrican
- ikemen
- jzintv
- mupen64plussa
- opentyrian
- prince
- smw
- sonic2013
- soniccd
- sonicmania
- supertux2
- supertuxkart
- xash3d
- yabasanshiro
dual_mode_cores:
- FBNEOSA
@@ -4412,15 +4352,6 @@ launchers:
fails_when_missing: false
source_ref: "packages/sx05re/emuelec/bin/emuelecRunEmu.sh:198-200, packages/sx05re/emulators/flycastsa/scripts/flycast.sh:11,\
\ 14"
- emulator: flycast_dojo
build: standalone
kind: links
names: []
search_dir: /storage/roms/bios/dc_dojo
passes_to: symlink /storage/.local/share/flycast-dojo -> /storage/roms/bios/dc_dojo
fails_when_missing: false
source_ref: "packages/sx05re/emuelec/bin/emuelecRunEmu.sh:201-203, packages/sx05re/emulators/flycast-dojo/scripts/flycastdojo.sh:11-12,\
\ 28-30"
- emulator: amiberry
build: standalone
kind: links
+29 -4
View File
@@ -209,7 +209,18 @@ class Scraper(BaseScraper):
)
not_cores = _not_cores(PLATFORM_NAME)
cores, standalone, dual = es_cores(es_systems, RUNNERS, BUILDS_OF, not_cores)
# Each system keeps the list es_systems.json gives it: it says whose
# files a platform entry asks for. What runs is what an image carries.
attach_system_cores(systems, system_cores(es_systems, RUNNERS, not_cores))
built = self._built()
unbuilt = {n for n in cores if n not in built}
cores, standalone, dual = ([n for n in names if n in built] for names in (cores, standalone, dual))
# Runners (retroarch, retrorun) and the launcher's own spellings are
# no ES core name: only a record of an emulator no image carries goes.
launchers = [
r for r in extract_launchers(RepoTree.github(REPO, launcher_revision(self.url)))
if not set(str(r["emulator"]).split(", ")) <= unbuilt
]
return {
"platform": "EmuELEC",
"version": self.tag.removeprefix("v"),
@@ -225,12 +236,26 @@ class Scraper(BaseScraper):
"standalone_cores": standalone,
"dual_mode_cores": dual,
"systems": systems,
# Read at the revision the BIOS list comes from.
"launchers": extract_launchers(
RepoTree.github(REPO, launcher_revision(self.url))
),
# Read at the revision the BIOS list comes from, for the
# emulators an image carries.
"launchers": launchers,
}
def _built(self) -> set[str]:
"""The cores at least one released device image carries.
Read by the targets scraper: a device keeps a core when a package it
builds installs it and its es_systems.cfg still offers it. The port
engines depend on emuelec-ports, which no package of an image
depends on, and flycast-dojo is in no device list (UNBUILT there).
"""
try:
from .targets.emuelec_targets_scraper import Scraper as DeviceTargets
except ImportError:
from scraper.targets.emuelec_targets_scraper import Scraper as DeviceTargets
targets = DeviceTargets().device_targets(self.tag)["targets"]
return {name for entry in targets.values() for name in entry["cores"]}
def main() -> None:
from .base_scraper import scraper_cli
@@ -610,7 +610,12 @@ class Scraper(BaseTargetScraper):
return fetch_bytes(RAW.format(ref=self.ref, path=path)).decode("utf-8")
def fetch_targets(self) -> dict:
self.ref = self.pinned_revision(PLATFORM_NAME)
return self.device_targets()
def device_targets(self, ref: str | None = None) -> dict:
"""The targets file, read at `ref`, by default the revision
platforms/emuelec.yml was scraped at."""
self.ref = ref or self.pinned_revision(PLATFORM_NAME)
release = json.loads(
fetch_bytes(RELEASE_API.format(ref=self.ref), headers=github_headers())
)
+1
View File
@@ -302,6 +302,7 @@ class TheCommittedListsAgree(unittest.TestCase):
listed = {str(c) for s in config["systems"].values() for c in s.get("cores", [])}
self.assertTrue(listed, "no system carries its cores")
self.assertEqual(listed - platform - (listed - built), set())
self.assertEqual(platform - built - {"lexaloffle", "mpv", "vox_official"}, set())
if __name__ == "__main__":
+2
View File
@@ -207,6 +207,8 @@ class APlatformEntryTakesNoOtherEmulatorsTree(unittest.TestCase):
config = load_platform_config("emuelec", str(REPO_ROOT / "platforms"))
entry = config["systems"]["vvvvvv"]["files"][0]
# No image builds the VVVVVV port engine, but es_systems.json still
# names it for the system: its tree is the one the entry asks for.
self.assertEqual(entry["platform_cores"], ["VVVVVV"])
db = load_database(str(REPO_ROOT / "database.json"))
path, _status = resolve_local_file(