fix: a games part is its system's card

Closes every finding of code_audit_23 and tui_audit_16: AmberELEC and
EmuELEC cards found as theirs, ArkOS cards told by bgmusic or
launchimages, counts that agree and read a copy of the right size before
calling it in place, one terminal width, line mode in the screen's order
and words, a tap shown armed, and which-pack naming the first screen.
This commit is contained in:
Abdessamad Derraz committed 2026-10-28 16:34:55 +01:00
1 parent 27b945ba4c
commit a4faf536dd
12 files changed
+1257 -254

No files matched your search

+9 -3
View File
@@ -161,8 +161,13 @@ def _marker(rule: _install._OsRule) -> str:
path, pattern = rule.values
line = re.sub(r"\\s\*\$$", "", re.sub(r"^(\^|\\A)", "", pattern)).replace("\\", "")
return f"`{path}` holding the line `{line}`"
return ", ".join(f"`{value}`" if PurePosixPath(value).suffix else f"`{value}/`"
for value in rule.values)
named = ", ".join(f"`{value}`" if PurePosixPath(value).suffix else f"`{value}/`"
for value in rule.values)
if rule.method == "games_part":
# Told on the games part beside its bios folder, on a drive the
# system does not call fixed (install.games_part).
return f"{named} beside `bios/`, on a drive that is not a fixed disk"
return named
def _list_words(plat: str) -> str:
@@ -173,7 +178,8 @@ def _list_words(plat: str) -> str:
def card_marker_rows() -> list[list[str]]:
"""The files that name a card or a SHARE drive, in the order they are
read: install.py's card rules, then its SHARE drive files."""
rows = [[_marker(rule), rule.name, f"`{rule.bios}`, {_list_words(rule.manifest)}"]
rows = [[_marker(rule), rule.name,
f"`{rule.bios or 'bios'}`, {_list_words(rule.manifest)}"]
for rule in _install._card_rules()]
hostname = "system.hostname=BATOCERA"
for plat, marker in _install._SHARE_DRIVES: