carried_trees and claimed_tree_files in datatrees decide which trees an
emulator pack carries and where, and walk them under the cache lock.
The builder writes what they yield and verify records it, instead of
two copies of the selection and an unlocked walk on the verify side.
emulatorcheck and emulatorpack each expanded a profile, filtered it by
system, by --required-only and by region, and chose its archive units
and loose slots. emulator_pack_entries now does it once and both read
it. The --required-only spares are taken among the entries the pack
still carries, as their docstring says: the builder passed the
unnarrowed list, so an optional member of a required set could be kept
over a required one the pack ships. No profile has such a member today.
core.ziptools.zip_members lists the name, size and crc32 of each member once per archive revision. The site lookup and cards, the gap report, the pack check, the romset importer, the recipe identification and build, provenance, derivations and the atom pool read it instead of opening each archive again.
Each reader also tested a .zip suffix and skipped the .variants/ copies (x.zip.1a2b3c4d): the site lookup listed no member of a copy, the gap report's member index never saw one, the pack check never compared a copy's members, and the pack builders copied a copy without its CRC test. They now use is_archive_path. The inner ROM index of the resolver reads copies too, and a copy answers only for a member no primary holds.
bounded_pack_name repeated bounded_join with another joiner and budget, and md5pack hashed its selection inline. bounded_join takes joiner, budget and suffix, selection_digest serves all three; emulator packs keep the '_' joiner, so no name changes.
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.
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.
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.