mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-14 14:03:47 -06:00
feat: carry the data trees a platform's cores read
A platform pack carried only the trees its own systems declared, so for_platforms reached RetroArch, Lakka and RetroPie alone and every other platform running blueMSX, FBNeo or Dolphin got no tree. The pack, the install list and the pipeline's tree members now add the trees of the libretro cores the platform runs, below the system directory and build folder the core reads, unless the platform installs or never opens them. A platform entry the manifest resolved into a carried tree becomes that tree's member, which the installer can fetch: AmberELEC and EmuELEC no longer hold 192 blueMSX machine configs back. stonesoup reads its tree beside the content and pcee2 compiles its resources in, so neither tree reaches a BIOS pack.
This commit is contained in:
1 parent
736dadd7e9
commit
54a3876a8b
11 files changed
+428
-70
No files matched your search
@@ -333,10 +333,10 @@ def write_small_list(path: Path) -> None:
|
||||
def _child(spec: dict) -> int:
|
||||
"""install.main() as the sample runs it, in its own process. Only the
|
||||
transport and the machine are stood in for: no connection leaves the
|
||||
loopback, detection finds the card folder the spec names, a file of a
|
||||
landed run reports its bytes written without fetching them, and a held
|
||||
run finds every file in place. The counts, sizes and words are the
|
||||
installer's own."""
|
||||
loopback, detection finds the card folder the spec names, a file or a
|
||||
data tree of a landed run reports its bytes written without fetching
|
||||
them, and a held run finds every file and tree in place. The counts,
|
||||
sizes and words are the installer's own."""
|
||||
import concurrent.futures # noqa: PLC0415
|
||||
import socket # noqa: PLC0415
|
||||
from unittest import mock # noqa: PLC0415
|
||||
@@ -362,6 +362,13 @@ def _child(spec: dict) -> int:
|
||||
def held(files: list[dict], _bios: Path, **_kwargs: object) -> tuple:
|
||||
return [], list(files), []
|
||||
|
||||
def tree_landed(entry: dict, _bios: Path, state: object = None) -> dict:
|
||||
return {"present": 0, "installed": len(entry["files"]), "changed": 0,
|
||||
"absent": 0, "error": "", "not_kept": []}
|
||||
|
||||
def tree_held(entry: dict, bios: Path, remember: bool = False) -> tuple:
|
||||
return bios / entry.get("dest", ""), {}, len(entry["files"])
|
||||
|
||||
patches = [
|
||||
mock.patch.object(socket, "create_connection", loopback_only),
|
||||
# One worker and the submission order: the progress lines of a log.
|
||||
@@ -376,8 +383,10 @@ def _child(spec: dict) -> int:
|
||||
]
|
||||
if spec.get("landed"):
|
||||
patches.append(mock.patch.object(_install, "_download_one", landed))
|
||||
patches.append(mock.patch.object(_install, "install_data_directory", tree_landed))
|
||||
if spec.get("held"):
|
||||
patches.append(mock.patch.object(_install, "check_local", held))
|
||||
patches.append(mock.patch.object(_install, "data_directory_state", tree_held))
|
||||
with contextlib.ExitStack() as stack:
|
||||
for patch in patches:
|
||||
stack.enter_context(patch)
|
||||
|
||||
Reference in new issue
Block a user