mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 12:28:51 -06:00
fix: hold the repository for source-paths.json
This commit is contained in:
1 parent
bdfdb608e0
commit
30113783c9
4 files changed
+52
-21
No files matched your search
+11
-11
@@ -647,23 +647,23 @@ def _refresh_source_paths(args: argparse.Namespace) -> None:
|
||||
return
|
||||
from model.profiles import emulator_profiles_cache
|
||||
from sitegen import sources
|
||||
from core.artifacts import write_if_changed
|
||||
from core.artifacts import ArtifactLockBusy
|
||||
|
||||
# The run loaded the profiles before writing them, and the loader caches
|
||||
# by directory: read again, the record described the pins just replaced
|
||||
# (linapple, then ten profiles in one advance).
|
||||
emulator_profiles_cache.clear()
|
||||
profiles = load_emulator_profiles(args.emulators_dir, skip_aliases=False)
|
||||
held, unread = sources.build_source_paths(
|
||||
profiles, [sources.TREE_CACHE], fetch=True
|
||||
)
|
||||
held = sources.keep_unread(
|
||||
held, unread, sources.read_record(sources.SOURCE_PATHS)
|
||||
)
|
||||
sources.SOURCE_PATHS.parent.mkdir(parents=True, exist_ok=True)
|
||||
write_if_changed(
|
||||
str(sources.SOURCE_PATHS), json.dumps(held, indent=1, sort_keys=True) + "\n"
|
||||
)
|
||||
try:
|
||||
held, unread = sources.refresh_record(profiles, [sources.TREE_CACHE], fetch=True)
|
||||
except ArtifactLockBusy as exc:
|
||||
# The profiles are written: only the record waits for the other run.
|
||||
print(
|
||||
f"source paths not refreshed ({exc}): run python scripts/sitesources.py "
|
||||
"--fetch once it finishes",
|
||||
file=sys.stderr,
|
||||
)
|
||||
return
|
||||
print(
|
||||
f"source paths: {sum(map(len, held.values()))} in {len(held)} trees, "
|
||||
f"{len(unread)} trees not cached: {sources.SOURCE_PATHS}",
|
||||
|
||||
Reference in new issue
Block a user