Commit Graph
23 Commits
Author SHA1 Message Date
Abdessamad Derraz f10fa21d17 docs: split clause semicolons in new comments 2026-11-21 06:45:11 +01:00
Abdessamad Derraz ec50bf6b41 fix: say why a local list beside --manifest fails
An oversized or unreadable standalone layout said "not valid: Expecting
value", and an unreadable target list read as absent, so the offline
run asked for the file already there. One reader of a capped local JSON
file now says the cause: unreadable, too large or not JSON.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 8d2f71b026 fix: say why no list is found on the screen too
With RETROBIOS_REF on a tag that has no list, line mode named the
variable and the way out. The screen said only that there is no list at
this address, and gave no advice with the default revision either. Both
now read the same advice.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 68378b4423 refactor: join names and date records in one place
Five sentences joined names by hand beside _names_and, the plan counted
"more systems" beside _plural, a record stamped its time beside
_record_now, and the record day and the backup day each formatted a
date. Each now calls the one helper.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz f412f7803d chore: keep two blank lines after part names 2026-11-21 06:04:39 +01:00
Abdessamad Derraz 8ecd102c77 refactor: name the listing options once
Eight places tested the five --list-* options by hand, and four lists
named them. One table and one function now say which a run gave, so a
sixth listing is one line.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 9a27d0b574 refactor: name pack parts in one module
The part and marker names of a split pack were built and matched in
both the pack reader and the pack writer. The reader owns them now,
both patterns built from one.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz b338d94fa0 fix: record no narrowing axis for an older list
A list with cores and neither systems nor regions is from an older
release, and recorded_axes reads none from it. A pack built here or by
generate_pack wrote cores and regions in its manifest. The installer
pack now asks recorded_axes, and the builder follows the same rule.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 7284a90a20 refactor: fold removal dests through one helper
Seven places in the removal compared a destination casefolded where the
drive folds case, three of them as closures of their own. One function
does it, so every comparison folds the same way.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 8c74f3f0bc fix: read a typed folder the same in both modes
Line mode dropped quotes only when both ends had one, so a half-selected
paste made a folder whose name starts with a quote. The screen's reader
is now the only one: any quote at either end goes, variables expand
before ~.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz ee2e6e80ce refactor: list the copies of an entry in one place
Nine places listed an entry with its alternatives and slot choices by
hand. The known core names read only the alternatives, so a core named
by a slot choice alone would have counted as unknown.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 7b89a558ff fix: ask folder questions through one reader
The copy question, the card question and the BIOS folder question each
read q, Enter, a listed number or a folder. With no drive listed, the
copy question took "2" as the folder ./2. They share one reader now,
and the y/N questions read only y or yes: "yeah" created folders.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 1f215f1732 refactor: read mountinfo through one helper
The card checks and the FAT32 test each read /proc/self/mountinfo and
decoded its escaped mount point. One function reads the table and one
decodes a mount point.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 2502d96734 refactor: count files read with one live counter
The check of files on disk and the read of a card's games each drew
their own "read N/M" line and progress events. Both use one counter
now, which only differs by its event kind and its noun.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz bf34e71804 fix: remove the games cache scratch on a failure
A cache write that failed left index.json.<pid>.part behind, one more
on each run. The cache and the install record now write through one
scratch file beside the target, removed when the write fails and named
when it cannot be.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 5d0c2fd3c6 refactor: read retroarch.cfg values in one place
The Android launcher checks, the save folder rules and the UWP package
read retroarch.cfg with parsers of their own. They now share the one
that says an unreadable config once, and the UWP package expands its
~ as RetroArch does. The cores and info folders look up the config
beside a system folder through one function.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz 6acdf4b193 fix: retry archives and the app like files
One decision says whether a failed request is asked again and when:
5xx and 429 wait what Retry-After asks, a clock in the past or no certificate
list stops at once. A data archive and the handheld app waited 1 s on a
429 that asked for 30 and gave up where a BIOS file arrived, and the app
took a body cut short of its Content-Length as the file.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz c41fb9e609 fix: give data tree files the umask mode
Verified bytes reach their place through one helper that sets the mode a
plain open() gives and clears a read-only attribute. A data tree member
skipped both and landed 0600, unreadable by the emulator after a sudo
install. The expected digests of an entry are read by one function.
2026-11-21 06:04:39 +01:00
Abdessamad Derraz a92d81c385 fix: cap what a rolling data tree may write
A followed member is written up to twice its listed size plus 16 MiB,
and the whole tree up to twice its listed total plus 16 MiB: a source
serving gigabytes where the list records kilobytes fills no drive.
2026-11-19 09:05:41 +01:00
Abdessamad Derraz ff69210b18 feat: pin forge data trees, follow nightly ones
A data tree whose source names a revision is fetched at the commit its
branch points to and listed at that commit, whose bytes never change.
A source with no revision (the buildbot's nightly assets) is marked
rolling: the installer writes each listed file as the source serves it,
checked against its ZIP CRC-32, as RetroArch's own downloader does, and
the install record keeps it in place on the next run. The PPSSPP list
refused 49 of 169 files after each buildbot rebuild.
2026-11-19 08:59:42 +01:00
Abdessamad Derraz b688f41a5a docs: name the modules that replaced common.py
The wiki, the platforms README and two comments named common.py, and
the installer's region table named scripts/region.py. tools.md lists
core/, model/ and resolve/ where it listed common.py, and the testing
guide names test_layers. install.py is rebuilt from installer/ and its
pins rewritten.
2026-11-18 11:43:36 +01:00
Abdessamad Derraz 6b597f85a0 refactor: give each installer module one role
The split had pushed each helper down into the lowest module using it.
Names now sit with the concern they belong to (68 modules, 45 before),
each with a one-line docstring saying it, and the import graph stays
acyclic. Statement source and comments moved unchanged: every top-level
statement of install.py keeps an identical ast.dump.
2026-11-18 02:55:56 +01:00
Abdessamad Derraz e9f6fe43a0 refactor: split the installer into a package
install.py held 31,575 lines and 1,370 definitions in one module. Its
source is now installer/, 45 modules by concern, each importing from the
others what it uses, so ruff and mypy read every module on its own.

scripts/build_installer.py joins them back into install.py in import
order, with one block of standard library imports and the zlib and
unicodedata guard. It refuses an import from outside the standard
library, a name two modules define, an import cycle, a renamed import
and an import-time read of a name from a later module. install.py stays
one stdlib-only file for the bootstraps, the launchers and PyPI.

The split was written by a script, statement by statement: every
top-level statement of the old file is in the new one with the same AST.
Two tests that located code by its neighbour now read it by name.
2026-11-18 01:37:28 +01:00