mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-25 10:58:52 -06:00
fix: refresh buildbot updates from its registry
check_buildbot_system --update ran scripts/refresh_data_dirs.py by a relative path and without --registry: the refresh read the default registry, and outside the repository root the child was not found and every updated entry was reported failed. The command now refreshes in process through packs.datadirs.refresh_keys with the registry it checked; buildbot_system keeps the check and its selectors.
This commit is contained in:
1 parent
e6295aba88
commit
24463647f6
5 files changed
+77
-32
No files matched your search
@@ -3,8 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import subprocess
|
||||
import sys
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
|
||||
@@ -104,26 +102,9 @@ def print_report(report: dict) -> None:
|
||||
print(f"\nSummary: {', '.join(parts)}")
|
||||
|
||||
|
||||
def update_changed(report: dict) -> list[str]:
|
||||
"""Refresh entries that have changed and return the keys whose refresh failed."""
|
||||
failed: list[str] = []
|
||||
for e in report.get("entries", []):
|
||||
if e["status"] == "UPDATED" and e.get("key"):
|
||||
log.info("refreshing %s ...", e["key"])
|
||||
result = subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
"scripts/refresh_data_dirs.py",
|
||||
"--force",
|
||||
"--key",
|
||||
e["key"],
|
||||
],
|
||||
check=False,
|
||||
)
|
||||
if result.returncode != 0:
|
||||
log.error("refresh of %s failed (exit %d)", e["key"], result.returncode)
|
||||
failed.append(e["key"])
|
||||
return failed
|
||||
def updated(report: dict) -> list[str]:
|
||||
"""Keys of the tracked entries whose remote version changed."""
|
||||
return [e["key"] for e in report.get("entries", []) if e["status"] == "UPDATED" and e.get("key")]
|
||||
|
||||
|
||||
def pending(report: dict) -> list[dict]:
|
||||
|
||||
Reference in new issue
Block a user