mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: keep the -sa name in ROCKNIX targets
The target scraper stripped -sa from every standalone package while the platform scraper keeps both spellings. vice-standalone, scummvm-standalone and supermodel3 answer to vice-sa, scummvm-sa and supermodel-sa only, so every targeted ROCKNIX build left them out. Both now read standalone_emulators(), and the targets are rescraped at tag 20261001.
This commit is contained in:
1 parent
87f6211983
commit
3cb1d9c06a
4 files changed
+649
-20
No files matched your search
+342
-16
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -30,8 +30,10 @@ DEVICES_DIR = "projects/ROCKNIX/devices"
|
||||
|
||||
try:
|
||||
from ..base_scraper import fetch_bytes, github_headers
|
||||
from ..rocknix_scraper import standalone_emulators
|
||||
except ImportError:
|
||||
from scraper.base_scraper import fetch_bytes, github_headers
|
||||
from scraper.rocknix_scraper import standalone_emulators
|
||||
|
||||
# `NAME="a b \
|
||||
# c"` or `NAME+=" a b"`, continuation lines joined first.
|
||||
@@ -91,11 +93,13 @@ def core_names(libretro: list[str], standalone: list[str]) -> list[str]:
|
||||
"""Package names as the profiles' cores: lists spell them.
|
||||
|
||||
A libretro package is the core's name with `-lr` (`beetle-psx-lr`,
|
||||
`neocd_lr`), spelled with underscores as the buildbot names it, and a
|
||||
standalone package drops its `-sa` (`duckstation-sa`, `hatarisa`).
|
||||
`neocd_lr`), spelled with underscores as the buildbot names it. A
|
||||
standalone package is kept under both spellings, as the platform
|
||||
scraper keeps it: `vice-sa` is the only name vice-standalone answers
|
||||
to, `vice` that of the libretro profile.
|
||||
"""
|
||||
names = {re.sub(r"[-_]lr$", "", package).replace("-", "_") for package in libretro}
|
||||
names.update(re.sub(r"-?sa$", "", package) for package in standalone)
|
||||
names.update(standalone_emulators(standalone))
|
||||
return sorted(names)
|
||||
|
||||
|
||||
|
||||
@@ -372,6 +372,21 @@ class RocknixPerDevice(unittest.TestCase):
|
||||
self.assertIn("dolphin", amd64)
|
||||
self.assertNotIn("drastic", amd64)
|
||||
|
||||
def test_a_standalone_package_keeps_both_spellings(self):
|
||||
"""vice-standalone answers to vice-sa only, as scummvm-standalone to
|
||||
scummvm-sa: stripped to vice, every targeted pack left them out
|
||||
while the untargeted one, read from the platform scraper, kept them."""
|
||||
from scraper.rocknix_scraper import standalone_emulators # noqa: PLC0415
|
||||
from scraper.targets.rocknix_targets_scraper import ( # noqa: PLC0415
|
||||
core_names,
|
||||
parse_device_cores,
|
||||
)
|
||||
|
||||
libretro, standalone = parse_device_cores(self.PACKAGE_MK, "SM8550", "aarch64", False)
|
||||
names = set(core_names(libretro, standalone))
|
||||
self.assertTrue({"aethersx2-sa", "aethersx2", "dolphin-sa", "dolphin"} <= names)
|
||||
self.assertTrue(set(standalone_emulators(standalone)) <= names)
|
||||
|
||||
def test_a_metapackage_names_the_cores_it_installs(self):
|
||||
from scraper.targets.rocknix_targets_scraper import metapackage_cores # noqa: PLC0415
|
||||
|
||||
|
||||
Reference in new issue
Block a user