mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-11 22:13:23 -05:00
fix: skip conformance on required-only packs
A required-only build is narrower than the platform declares by design, like the source-restricted variants already handled, so the full expectation must not be applied to it. --region is also refused alongside --manifest-targets, which carries no region dimension.
This commit is contained in:
1 parent
2879f489c4
commit
d8e4325af2
2 files changed
+31
-2
No files matched your search
@@ -3298,6 +3298,8 @@ def main():
|
||||
args.regions = region_mod.parse_requested(args.region)
|
||||
except ValueError as exc:
|
||||
parser.error(str(exc))
|
||||
if args.manifest_targets:
|
||||
parser.error("--region is incompatible with --manifest-targets")
|
||||
|
||||
# Quick-exit modes: --verify-packs alone = verify existing packs only
|
||||
# Combined with --all-variants, generation runs first then verify
|
||||
@@ -4543,6 +4545,16 @@ def verify_pack_against_platform(
|
||||
)
|
||||
|
||||
|
||||
def _narrows_contents(pack_name: str) -> bool:
|
||||
"""True when a pack holds fewer files than the platform declares.
|
||||
|
||||
A source-restricted or required-only build is narrower by design, so the
|
||||
full platform expectation does not apply to it and conformance is skipped.
|
||||
Region is not listed: the region filter is passed to the check itself.
|
||||
"""
|
||||
return any(tag in pack_name for tag in ("_Platform_", "_Truth_", "_Required"))
|
||||
|
||||
|
||||
def verify_and_finalize_packs(
|
||||
output_dir: str,
|
||||
db: dict,
|
||||
@@ -4595,8 +4607,7 @@ def verify_and_finalize_packs(
|
||||
# Skipped for filtered/split/custom packs (intentionally partial)
|
||||
if skip_conformance:
|
||||
continue
|
||||
# Skip conformance for non-full source variants
|
||||
if "_Platform_" in name or "_Truth_" in name:
|
||||
if _narrows_contents(name):
|
||||
continue
|
||||
platforms = pack_to_platform.get(name, [])
|
||||
for pname in platforms:
|
||||
|
||||
@@ -5659,6 +5659,24 @@ struct BurnDriver BurnDrvneogeo = {
|
||||
)
|
||||
self.assertTrue(checked.issubset(self._names_in(out)))
|
||||
|
||||
def test_narrowed_variants_skip_conformance(self):
|
||||
from generate_pack import _narrows_contents
|
||||
|
||||
for narrowed in (
|
||||
"EmuDeck_2.3.8_Required_BIOS_Pack.zip",
|
||||
"EmuDeck_2.3.8_Platform_BIOS_Pack.zip",
|
||||
"EmuDeck_2.3.8_Truth_Required_BIOS_Pack.zip",
|
||||
"EmuDeck_2.3.8_NorthAmerica_Required_BIOS_Pack.zip",
|
||||
):
|
||||
self.assertTrue(_narrows_contents(narrowed), narrowed)
|
||||
|
||||
for full in (
|
||||
"EmuDeck_2.3.8_BIOS_Pack.zip",
|
||||
"EmuDeck_2.3.8_NorthAmerica_BIOS_Pack.zip",
|
||||
"RetroArch_v1.22.2_Switch_BIOS_Pack.zip",
|
||||
):
|
||||
self.assertFalse(_narrows_contents(full), full)
|
||||
|
||||
def test_target_tag_formats_hardware_names(self):
|
||||
from generate_pack import _target_tag
|
||||
|
||||
|
||||
Reference in new issue
Block a user