The data directory refresh dropped any name containing .. in silence,
wrote a backslash as a filename character and let a drive letter or a
backslash traversal through. The pack integrity check flagged Read..me
as a traversal. Both now use safe_member_parts, and an unsafe member
fails the refresh of its key instead of thinning the tree.
A read that timed out raised TimeoutError past every handler and ended
the search for every remaining file, a 429 was never waited out, and an
oversize body at the name URL skipped the destination URL.
download.py read GITHUB_TOKEN only and missed the gh login token, the
readme built its header by hand, and the large files listing cached one
failed request as an empty release for the whole run.
get_remote_sha parsed a GitLab subgroup as its first two segments, asked
the branches endpoint, which resolves no tag, sent the token to any URL
containing github and skipped the refresh on one 502. resolve_head reads
subgroups, encodes the ref, scopes the token and retries.
fetch_bytes and fetch_body now share open_retrying and read_limited:
scrapers retry a 500 or a dropped connection like profile_sync, and
fetch_body caps the body it reads.
parse_systems read the systems dict with regular expressions beside extract_systems_dict. It now uses the shared reader: on the cached rocknix-systems both give the same 14 systems and entries.
ListSource.browse builds file links with source_permalink, which quotes
the path. A list read at no revision still links the repository, and a
GitLab list with no path now links its tree instead of a blob URL
ending in a slash.
core.gitclone gains required_git_lines, which raises GitRefused with
git's error, and fallback_lines, the remote lines tried when no remote
names the project. profile_sync and validate_pr use both.
profile_sync --changed without --base now also finds a clone whose main
line is upstream/master, upstream/v2, origin/master or origin/v2, as
validate_pr already did, before falling back to HEAD.
model.releaserecord now holds match_key, pack_label and pack_owner,
which the release notes and download.py each kept a copy of, and
recorded_pack, the pack release.json says serves a platform.
download.py reads release.json when it records the release it
downloads from. Otherwise it matches pack names and takes the shortest
match, so retroarch gets RetroArch_v1.22.2 rather than the
AndroidArm64V8A target pack listed before it.
sitegen.config.build_commit (GITHUB_SHA in CI, HEAD locally, a full
commit id or an error) replaces the copies in bootstrap, pagemarkdown
and dataexports.
The page stamps now refuse a GITHUB_SHA that is not a commit id. The
data exports now name GITHUB_SHA when it is set, and still name no
commit outside a checkout.
model.largefiles.restore_verified replaces generate_db _restore and
release restore _copy_verified: a scratch copy beside the target,
hashed, then renamed into place with a plain mode.
generate_db now refuses to put back a cached asset whose copy does not
hash to its database entry. The entry is still kept, as for an asset
the cache cannot supply. The restore script copies once instead of
through a second scratch.
core.sizes.size_text replaces readme format_size, release record
size_text, render fmt_size, the large-files notes _mib and the handheld
_size. It prints one decimal in the largest unit reached, as the site
and the installer already did.
The README download table, the release notes and the large-files page
now say 29.2 MB where they said 29 MB, a handheld archive says 85.3 KB
where it said 85 KB, and a large-files asset under 1 MB is given in KB.
The probes resolve held files, read content.yml, list the buildbot and
fetch nightlies through one function each.
- region_check resolves BIOS files from the repo root (probes.entries
held_file), so a run outside the root no longer sees every file missing.
- region_check reads content.yml as Content objects, and a malformed
content folder raises Unavailable instead of FileNotFoundError.
- region_check and pack_probe fetch nightlies like the campaign: retried
on network errors, streamed to disk, and replaced when the buildbot's
ETag or Last-Modified moves. region_check keeps its cores under
.cache/region/cores/<core>/ with a build.json record. pack_probe
--refresh-cores now downloads only a nightly the buildbot replaced.
- The campaign loads profiles with load_emulator_profiles, so *.old.yml
backups are skipped and hashes are normalized. Profile digests still
come from the file on disk, so recorded checks keep their digest.
model.profiles.profile_names(key, profile) gives a profile's key then
the names its cores: lists, and core_key moves there from contentlayout
with core_key_index, upstream_profile_index keyed by it. The inline
{key, *cores} sets and scans in resolve and packs read profile_names;
the two roms folder matchers read core_key_index. The parameter of
select_emulator_profiles is renamed requested.
Matching stays exact everywhere it was exact. Folding case and -/_
everywhere would merge distinct profiles: dosbox_pure (Batocera,
AmberELEC, EmuELEC) would also name dosbox-pure-unleashed, and
pcsx_rearmed would also name pcsx_rearmed_standalone (RetroPie's
pcsx-rearmed). Only roms folder rows (retrobat BSNES, Snes9x, mGBA,
emudeck vice-x64sc...) depend on the fold, and those already fold.
The alias lookup of select_emulator_profiles now compares string core
names, as every other reader does. No output change.
model.declarations.declared_slot(entry, prefix) is the declared
destination less the platform's BIOS root, empty when the entry names no
path. platform_declarations, platform_declared_contents,
declared_destinations, system_core_reach, find_collisions and
platform_claims read it in place of destination-or-name. The core extras
of the builder and the manifest read declared_destination, and the
builder's case twin list asks Placed.block.
Behavior: the 134 EmuDeck system:md5 entries (destination: '') claim no
slot. They were filed under their name, sony-playstation:<md5>, a path
nothing else names: slots and collisions drop those claims, and
case_folded_slots skips an empty slot. Their names and contents still
count as declared, in the root folder as before.
model.database.record_at and sha1_at read one cached path index with
normpath keys. They replace records_by_path of resolve.packfiles, the
manifest's own sha1 index, the per-call indexes of regionaudit,
emulatorcheck and hidden_extras, and the linear scan of held_record.
resolve_sha1 drops its by_path argument. A path spelled with ./ or a
doubled slash now finds its record everywhere; the database writes none,
so the output is the same.
comparable_destination moves to core.paths. Placed, placement_block,
the shared group merge of model.platforms and LauncherPlace.fold read it
in place of their own lower(). It also trims surrounding blanks and
slashes and folds with casefold: no destination, collection path or
launcher name differs under those rules today, so the output is the
same.
data_directory_members, pack_data_tree and manifest_core_entries take
the Placed record instead of three loose sets and a fold flag, and verify's
replay of the builder (_builder_placement), hidden_extras and the
emulator pack check keep a Placed of their own. hidden_extras records the
sha1 at each taken path through the new Placed content option, which keeps
its same-content case twin rule. No behavior change.
lists_files(profile) answers whether a profile declares files, false
for a launcher or an alias, and is_emulator(profile) whether it counts as
an emulator, false for an alias or a test core. Eighteen inline checks in
model, resolve and packs read them; each keeps the set it tested.
model.systems keeps its own check: it sits below model.profiles. No
behavior change.
packs.naming.system_display_name names a system in a pack file name,
read by system_tag in place of its copy of the loop. names_manufacturer
spells a maker through model.collection.manufacturer_slug, and
resolve.identity reads the maker folder with ownership.maker_of_relative,
the rule maker_folder applies. No behavior change.
build_supplemental_index and _supplemental_locations each opened every
ZIP under bios/. Both read _zip_members, cached per root, so an
unreadable archive is reported once instead of twice. No other change.
core.ziptools.readable_zip_member_crcs answers None for a file that is
no readable archive, and zip_member_crcs reads it as empty. The covering
archive choice of resolve.packfiles uses it in place of its own reader,
so it still gives up on an unreadable candidate and now shares the cache.
No behavior change.
nativemode.platform_mode(config) replaces the inline
config.get("verification_mode", "existence") of the builder, the
manifest, slots, integrity, extras, gaps, coverage and review. A value
outside the schema enum now falls back to the default everywhere, as
coverage already did. Every platform declares a valid mode.
csharp_source formats a source_ref through shell_launchers.merge_lines
and finds lines through core.lines.LineIndex. Its span merge joined the
same one-line gaps, so retrobat.yml refs are unchanged.
retropie_launchers keeps its adjacent-only rule: merge_lines would
rewrite lr-prboom.sh:86, 88 in four committed retropie.yml records.
core.lines.LineIndex answers the line of an offset by binary search.
mame_parser and fbneo_parser counted the newlines before each match,
O(n) per set, and csharp_source kept its own copy of the index.
arcade_parent_importer reads a profile's repository slug through
core.upstream.parse_repo and refuses a source that is not on GitHub,
the only forge its fetches reach.
script_members in retropie_scraper yields every shell script of a
RetroPie-Setup tarball. The platform scraper, the exporter and the target
scraper read the scripts through it. The target scraper fetched one
contents listing per section and about 200 raw files; it now reads the
tarball of the pinned revision in one request. On the cached tarball the
three produce the same module ids, scripts, BIOS-bearing scripts and
targets as before. The targets file keeps its source URL.