mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-23 01:57:48 -06:00
refactor: build platform packs without printing
build_platform_pack and build_split_packs return what the build came to and print nothing. print_platform_pack holds the report lines, and generate_pack and generate_split_packs compose the two. The variant choice, the plan and the data directory pass return their notices instead of printing them. The callers that silenced stdout to get a record now call the builder.
This commit is contained in:
1 parent
977d3f6874
commit
d8570c6480
15 files changed
+295
-205
No files matched your search
@@ -68,12 +68,11 @@ def check_split_packs(
|
||||
)
|
||||
full = archive.PackRecord()
|
||||
parts: dict[str, archive.PackRecord] = {}
|
||||
with contextlib.redirect_stdout(io.StringIO()), \
|
||||
contextlib.redirect_stderr(io.StringIO()):
|
||||
platformpack.generate_pack(
|
||||
with contextlib.redirect_stderr(io.StringIO()):
|
||||
platformpack.build_platform_pack(
|
||||
platform, platforms_dir, db, "bios", "", record=full, **args,
|
||||
)
|
||||
platformpack.generate_split_packs(
|
||||
platformpack.build_split_packs(
|
||||
platform, platforms_dir, db, "bios", "", records=parts, **args,
|
||||
)
|
||||
lines = split_differences(full, parts, archive.same_bytes)
|
||||
|
||||
Reference in new issue
Block a user