Commit Graph
21 Commits
Author SHA1 Message Date
Abdessamad Derraz 3869a24b6a refactor: let the restore command print its report 2026-11-21 16:43:57 +01:00
Abdessamad Derraz ef7884500e fix: write the published checksums in split_pack 2026-11-21 16:43:46 +01:00
Abdessamad Derraz 48d88da168 refactor: move six command run modes to packages
generate_db, generate_games_index, download, romset_recipes, validate_pr and list_platforms keep only main and build_parser: the database build goes to collection.run, the games index run to games.run, the pack info and its no-pack message to release.packinfo, the capture and build runs to romrecipes.runs, the file selection to resolve.reviewfiles. Tests reach the moved code through those packages.
2026-11-21 15:47:20 +01:00
Abdessamad Derraz 2f428a01a8 refactor: move the pack downloader into release 2026-11-21 14:58:26 +01:00
Abdessamad Derraz 036a6ebf29 refactor: reuse the shared helpers left copied
Copies of helpers the first pass created, replaced by the helper:
- source_yaml_file for our YAML sources (generate_db read them in the
  locale's encoding, a syntax error named no file);
- data_dir_registry_at in registry_bundles, platform_registry_at (new,
  beside load_platform_registry) in the manifest;
- DATA_DIRS_FILE for the registry path five modules spelled;
- load_optional_database, sha1_at, VERSIONS_FILE, installer_module;
- DerivedView where a cache was keyed by id() of a dict;
- count_text and series where a plural or a list was written by hand.
2026-11-21 10:31:29 +01:00
Abdessamad Derraz 4f6bb08e2a fix: print byte counts with size_text 2026-11-21 06:04:16 +01:00
Abdessamad Derraz a9d8e571c1 refactor: join name lists through core.text 2026-11-21 06:03:21 +01:00
Abdessamad Derraz 53d49bd002 refactor: name release assets in largefiles only
The dotted spelling, the download URL and the sha256 listing were rebuilt by release.assets, release.check and sitegen.cards. model.largefiles gives asset_spellings, asset_url, RELEASE_DOWNLOAD and digests_of. The release notes link is now URL-quoted like every other.
2026-11-21 06:02:44 +01:00
Abdessamad Derraz 8fdc00e07f refactor: look up a path's sha1 with sha1_at 2026-11-21 05:59:51 +01:00
Abdessamad Derraz d56c3e6e22 chore: drop the unused large-files asset fetch
release.assets.fetch_assets had no caller: check_release reads release.check.fetch_assets, and check_release_assets reads fetch_release.
2026-11-20 20:03:26 +01:00
Abdessamad Derraz 97af05db9a refactor: name release packs from the record
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.
2026-11-20 20:03:26 +01:00
Abdessamad Derraz 4dc4dc0429 refactor: restore large files with one copy
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.
2026-11-20 20:03:26 +01:00
Abdessamad Derraz ab0805e6cb refactor: print sizes with one function
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.
2026-11-20 20:03:26 +01:00
Abdessamad Derraz cf03dcb2ef refactor: share CLI options and default paths
core.paths holds the default database, platforms, emulators and bios paths, core.cli declares the options built on them (add_repo_inputs) and the --emulator/--system modes verify and generate_pack share. model.targets.target_scope answers --target for a command line, model.profiles.no_profile_for_systems the system with no emulator. tests/sources.declared_options reads the options a script declares through either form.
2026-11-20 18:28:46 +01:00
Abdessamad Derraz 348d5b51c3 refactor: read hashes and the registry one way
Hash fields go through core.hashing.parse_hash_list, which also splits comma-joined list items: the truth model compared a comma-joined sha256 list as one value. _registry.yml goes through load_platform_registry (required= where an absent file must stop the run), database.json through load_database, file and member digests through file_digest and stream_hashes. download.py and check_release read SHA256SUMS.txt with one parser: a sha256sum -b line matched nothing in download.py and the pack went unchecked.
2026-11-20 18:28:40 +01:00
Abdessamad Derraz 3853ca2f1c refactor: public names for cross-module reads 2026-11-18 22:59:51 +01:00
Abdessamad Derraz f371790dc6 refactor: hash fields and digests read in core 2026-11-18 22:19:45 +01:00
Abdessamad Derraz 2c8a9cfad8 refactor: one digest loop for files and streams 2026-11-18 21:42:28 +01:00
Abdessamad Derraz ba692da94f refactor: release tools read file_digest
core.hashing.file_digest is the streamed loop the release tools carried,
byte for byte: 1 MiB reads, read again each call. It replaces
compute_hashes with cache=False there.
2026-11-18 20:44:56 +01:00
Abdessamad Derraz b9c91a897d refactor: release tools hash through core.hashing
Five streamed hashlib loops in check, assets, sync and restore read the
digest through compute_hashes with cache=False: the same fresh read of
the bytes, written once.
2026-11-18 20:44:20 +01:00
Abdessamad Derraz c4fdf12874 refactor: release, installer_build, devtools pkgs
The release tools, the installer build tools and the repository's
commit and PR checks keep their commands and move their code into
three packages. The release record readers move to model.releaserecord,
romfolders to model, the buildbot check to scraper. The site reads the
handheld launchers and the bootstrap pin from installer_build.
2026-11-18 20:44:12 +01:00