Commit Graph
13 Commits
Author SHA1 Message Date
Abdessamad Derraz 940893d7d4 fix: keep the digest cache beside the scanned tree
The cache path and .gitignore were read from the working directory: a
scan of a copy replaced the repository's cache with the copy's entries,
keyed bios/... like the real ones, and the next run rehashed everything.
Both now come from the tree holding bios/, and kept release assets are
restored under it.
2026-11-22 00:58:05 +01:00
Abdessamad Derraz 05b6b9edcf fix: dedup keeps the copy the index names
dedup ranked copies by path_priority (variant, MAME, Arcade, length) while the scan picked the primary by _takes_primary (variant, emulator tree, walk order). Given sms.rom under bios/Other/zesarux/ and bios/Sega/Master System/, dedup removed the indexed copy and kept the foreign-tree one the resolver sets aside. Both now read collection.scan.primary_rank. The rank reproduces every primary of the current database.json, so the index does not move; dedup's tie-break follows the walk order instead of MAME and path length.
2026-11-21 19:50:46 +01:00
Abdessamad Derraz 49dbb2828d refactor: read the declarations once per database
collect_all_aliases opened platforms/ and emulators/ from paths fixed to
the working directory while declarations took them as parameters, so a
build walked every YAML twice. read_declarations now reads both once,
reports unreadable sources, and hands the alias pass and the proven-name
index their entries. generate_db gains --platforms-dir and
--emulators-dir and refuses a missing one.
2026-11-21 16:43:57 +01:00
Abdessamad Derraz a30984912c fix: keep the offline database build offline
preserve_large_file_entries mixed the keep-or-drop rule with a download,
a write into bios/ and a SystemExit. The rule is now surviving_entries,
the restore a separate step that receives offline, and read_database
raises DatabaseUnreadable that the build turns into exit 1. generate_db
gains --offline, which pipeline --offline passes to step 1.
2026-11-21 16:43:57 +01:00
Abdessamad Derraz 19681a3735 refactor: move ten command helpers into packages 2026-11-21 15:47:20 +01:00
Abdessamad Derraz 6d21a98342 docs: drop clause semicolons from three docstrings
test_prose_style named the comments in collection.record, resolve.reviewreport and romrecipes.build.
2026-11-21 15:47:20 +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 f77caa1885 fix: report only recorded names as mame clones 2026-11-21 14:58:03 +01:00
Abdessamad Derraz a0579c687e refactor: drop the no-op branch of dedup planning 2026-11-21 14:58:03 +01:00
Abdessamad Derraz 198515f1cb refactor: move dedup and integrity into collection 2026-11-21 14:58:03 +01:00
Abdessamad Derraz 1978d371ee refactor: index path tails through one helper 2026-11-21 14:58:03 +01:00
Abdessamad Derraz ed6ae84d2c refactor: move generate_db logic into collection 2026-11-21 14:58:03 +01:00
Abdessamad Derraz 84bad2e271 chore: add the five command packages 2026-11-21 13:49:33 +01:00