refactor: move the export library into exporter

This commit is contained in:
Abdessamad Derraz committed 2026-11-18 13:38:44 +01:00
1 parent 8738179f42
commit a5834a4b8a
14 files changed
+1059 -1024

No files matched your search

+5 -4
View File
@@ -129,11 +129,12 @@ class TheNativeIndexKeepsEveryPlatform(unittest.TestCase):
import io
import json
import export_native
from exporter import originals
from exporter.originals import SOURCES_INDEX, fetch
with tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp") as directory:
root = Path(directory)
index = root / export_native.SOURCES_INDEX
index = root / SOURCES_INDEX
class Response(io.BytesIO):
def __enter__(self):
@@ -147,9 +148,9 @@ class TheNativeIndexKeepsEveryPlatform(unittest.TestCase):
return Response(b"payload")
with mock.patch.object(
export_native.urllib.request, "urlopen", other_run_records_meanwhile
originals.urllib.request, "urlopen", other_run_records_meanwhile
):
export_native.fetch("https://a", root / "batocera" / "file", index)
fetch("https://a", root / "batocera" / "file", index)
recorded = json.loads(index.read_text())
self.assertEqual(recorded.get("retrobat/file.json"), "https://b")
self.assertEqual(recorded.get("batocera/file"), "https://a")
+1 -1
View File
@@ -19,7 +19,7 @@ from pathlib import Path
from resolve.localfile import resolve_local_file
from exporter import discover_exporters
from export_native import landed_changes
from exporter.landed import landed_changes
from resolve.reconcile import NativeFile, build_native_model
from exporter.batocera_exporter import md5_list_support
from scraper import rocknix_scraper
+2 -2
View File
@@ -31,7 +31,7 @@ class NativeCacheTests(unittest.TestCase):
self._tmp = tempfile.TemporaryDirectory()
self.addCleanup(self._tmp.cleanup)
self.cache = Path(self._tmp.name)
self.index = self.cache / cf.export_native.SOURCES_INDEX
self.index = self.cache / cf.SOURCES_INDEX
self.root = self.cache / "plat"
self.root.mkdir()
self.wanted = {"list.txt": "https://example.invalid/tag-2/list.txt"}
@@ -135,7 +135,7 @@ class PublishedExportTests(unittest.TestCase):
(output / f"{platform}.json").write_text("{}", encoding="utf-8")
return ok, [] if ok else ["the platform's own file is required"]
with mock.patch.object(cf.export_native, "export_platform", fake):
with mock.patch.object(cf, "export_platform", fake):
return cf.published_export_state(
"plat", object, Path("t"), Path("p"), Path("c"), self.published
)
+16 -16
View File
@@ -61,7 +61,7 @@ class RetroDeckWritesWhatItCounts(unittest.TestCase):
def test_an_appended_revision_is_not_counted_corrected(self):
# 64DD_IPL.bin declared twice (A, B), truth C: the render keeps both
# and appends C, and the summary said "1 hashes corrected".
from export_native import landed_changes
from exporter.landed import landed_changes
appended: set = set()
merged = RetroDeck._merge(
@@ -210,7 +210,7 @@ class RetroBatCountsOneAdditionPerPath(unittest.TestCase):
added: 78 additions announced for 75 items written."""
def test_an_addition_at_a_held_path_does_not_land(self):
from export_native import landed_changes
from exporter.landed import landed_changes
theirs = NativeFile("scph1001.bin", "scph1001.bin", "psx",
platform={"md5": A}, truth={"md5": A})
@@ -363,7 +363,7 @@ class EmuDeckWritesItsCorrections(unittest.TestCase):
self.assertIn(d, withheld[0])
def test_the_summary_reads_the_hook(self):
source = (Path(__file__).resolve().parents[1] / "scripts" / "export_native.py").read_text()
source = (Path(__file__).resolve().parents[1] / "scripts" / "exporter" / "native.py").read_text()
self.assertIn("withheld = exporter.withheld()", source)
@@ -397,7 +397,7 @@ class MisterCountsWhatItWrites(unittest.TestCase):
# The truth took the entry on a size contradiction and has no md5:
# the render kept MiSTer's hash, wrote the new size, and the summary
# announced the hash cleared.
from export_native import landed_changes
from exporter.landed import landed_changes
fe = NativeFile("boot.rom", "NES/boot.rom", "nes",
platform={"md5": A, "size": 100},
@@ -545,7 +545,7 @@ class RommKeepsItsOwnKeys(unittest.TestCase):
"""known_bios_files.json writes PLUTONIA.WAD's sha1 with a leading
space, which RomM compares as stored and never matches. The export
wrote it stripped and the summary named no change for it."""
from export_native import landed_changes
from exporter.landed import landed_changes
sha1 = "8" * 40
fe = NativeFile("PLUTONIA.WAD", "doom/PLUTONIA.WAD", "doom",
@@ -899,7 +899,7 @@ class SummaryCountsWhatTheTruthRewrites(unittest.TestCase):
)
def test_a_format_with_the_fields_counts_them(self):
from export_native import landed_changes
from exporter.landed import landed_changes
entry = self._entry()
changes = landed_changes(SystemDat(), {"neocd": NativeSystem("neocd", files=[entry])})
@@ -908,7 +908,7 @@ class SummaryCountsWhatTheTruthRewrites(unittest.TestCase):
self.assertEqual(changes.applied, ["neocd/neocdz.zip sha1"])
def test_a_format_without_them_does_not(self):
from export_native import landed_changes
from exporter.landed import landed_changes
from exporter.batocera_exporter import Exporter as Batocera
entry = self._entry()
@@ -927,14 +927,14 @@ class AStaleTruthIsRefused(unittest.TestCase):
import shutil
import tempfile
import export_native
from exporter.native import load_inputs, StaleTruth
root = Path(__file__).resolve().parents[1]
truth_dir = Path(tempfile.mkdtemp(dir=root / "tmp"))
self.addCleanup(shutil.rmtree, truth_dir, True)
(truth_dir / "retropie.yml").write_text("platform: retropie\nsystems: {}\n")
with self.assertRaises(export_native.StaleTruth):
export_native.load_inputs("retropie", truth_dir, str(root / "platforms"))
with self.assertRaises(StaleTruth):
load_inputs("retropie", truth_dir, str(root / "platforms"))
@@ -976,7 +976,7 @@ class TheSummaryCountsWhatTheFileCarries(unittest.TestCase):
)
def test_romm_drops_the_hashes_it_counts_cleared(self):
from export_native import landed_changes
from exporter.landed import landed_changes
from resolve.reconcile import Report
fe = self._contradicted()
@@ -994,7 +994,7 @@ class TheSummaryCountsWhatTheFileCarries(unittest.TestCase):
self.assertEqual(sorted(cleared), ["psx/scph5501.bin crc32", "psx/scph5501.bin sha1"])
def test_a_fill_no_record_holds_is_not_counted(self):
from export_native import landed_changes
from exporter.landed import landed_changes
fe = NativeFile(
"scph5501.bin", "scph5501.bin", "psx",
@@ -1016,7 +1016,7 @@ class TheSummaryCountsWhatTheFileCarries(unittest.TestCase):
self.assertNotIn("md5", merged[0])
def test_recalbox_counts_nothing_on_an_element_it_keeps(self):
from export_native import landed_changes
from exporter.landed import landed_changes
fe = NativeFile(
"scph5501.bin", "scph5501.bin", "psx",
@@ -1050,7 +1050,7 @@ class ARemovedSizeIsReported(unittest.TestCase):
took the entry over with no size: no counter named the removal."""
def test_the_removal_is_counted(self):
from export_native import landed_changes
from exporter.landed import landed_changes
from exporter.systemdat_exporter import Exporter as SystemDat
fe = NativeFile("neocdz.zip", "neocdz.zip", "SNK - NeoGeo CD",
@@ -1067,7 +1067,7 @@ class AnExtendedListIsReported(unittest.TestCase):
nothing. Only Batocera named the list it writes."""
def _records(self, exporter):
from export_native import landed_changes
from exporter.landed import landed_changes
platform = {"name": "f.bin", "md5": A, "core": "libretro/mesen"}
fe = NativeFile("f.bin", "f.bin", "s", platform=platform,
@@ -1085,7 +1085,7 @@ class AnExtendedListIsReported(unittest.TestCase):
)
def test_an_unchanged_value_reports_nothing(self):
from export_native import landed_changes
from exporter.landed import landed_changes
for exporter in (RetroDeck(), Recalbox()):
fe = NativeFile("f.bin", "f.bin", "s",
+1 -1
View File
@@ -17,7 +17,7 @@ import unittest
from pathlib import Path
from model.platforms import load_platform_config, _shared_yml_cache, _platform_config_cache
from export_native import load_inputs
from exporter.native import load_inputs
REPO_ROOT = Path(__file__).resolve().parent.parent
+18 -16
View File
@@ -14,7 +14,9 @@ import tempfile
import unittest
from pathlib import Path
import export_native
from exporter import native
from exporter.landed import landed_changes
from exporter.native import current_truth, export_platform, write_report
from siteexports import generate_exports_page, load_export_reports
ROOT = Path(__file__).resolve().parent.parent
@@ -38,7 +40,7 @@ class ExportReportIsWrittenAndRead(unittest.TestCase):
def test_report_round_trips_through_the_page_loader(self):
with tempfile.TemporaryDirectory(dir=ROOT / "tmp") as scratch:
report = _report("recalbox", ["es_bios.xml"])
export_native.write_report(Path(scratch) / "recalbox.json", report)
write_report(Path(scratch) / "recalbox.json", report)
(Path(scratch) / "recalbox").mkdir()
self.assertEqual(load_export_reports(scratch), [report])
@@ -47,11 +49,11 @@ class ExportReportIsWrittenAndRead(unittest.TestCase):
output directory was never made and the report crashed --all."""
with tempfile.TemporaryDirectory(dir=ROOT / "tmp") as scratch:
target = Path(scratch) / "fresh" / "retropie.json"
export_native.write_report(target, _report("retropie", []))
write_report(target, _report("retropie", []))
self.assertTrue(target.exists())
def test_export_keeps_every_change_not_the_printed_five(self):
source = (ROOT / "scripts" / "export_native.py").read_text(encoding="utf-8")
source = (ROOT / "scripts" / "exporter" / "native.py").read_text(encoding="utf-8")
body = source[source.index("def export_platform("):source.index("def write_report(")]
call = body[body.index("write_report("):]
for key, value in (
@@ -214,12 +216,12 @@ class TheRunReportStatesWhatTheFileCarries(unittest.TestCase):
]}}}
doubled = {"destination": "a.bin", "declarations": []}
with tempfile.TemporaryDirectory(dir=ROOT / "tmp") as scratch, \
mock.patch.object(export_native, "load_inputs",
mock.patch.object(native, "load_inputs",
return_value=(truth, scraped)), \
mock.patch.object(export_native, "unpinned", return_value=[]), \
mock.patch.object(export_native, "removal_candidates", return_value=[]), \
mock.patch.object(export_native, "doubled_in", return_value=[doubled]):
ok, messages = export_native.export_platform(
mock.patch.object(native, "unpinned", return_value=[]), \
mock.patch.object(native, "removal_candidates", return_value=[]), \
mock.patch.object(native, "doubled_in", return_value=[doubled]):
ok, messages = export_platform(
"plat", Plain, Path(scratch), Path(scratch) / "out",
str(ROOT / "platforms"), Path(scratch) / "cache", False,
)
@@ -323,7 +325,7 @@ class ReportedChangesAreTheDiff(unittest.TestCase):
if not original_path.is_file():
self.skipTest(f"no cached original for {platform}")
config = load_platform_config(platform, str(ROOT / "platforms"))
truth = export_native.current_truth(platform, config, str(ROOT / "platforms"))
truth = current_truth(platform, config, str(ROOT / "platforms"))
scraped = native_layer(config)
systems, report = build_native_model(truth, scraped)
exporter = discover_exporters()[platform]()
@@ -333,7 +335,7 @@ class ReportedChangesAreTheDiff(unittest.TestCase):
for p in (UPSTREAM_CACHE / platform).iterdir() if p.is_file()
}
produced = exporter.render(systems, report, originals, scraped)[filename]
changes = export_native.landed_changes(exporter, systems).records
changes = landed_changes(exporter, systems).records
return changes, original, produced, {"exporter": exporter, "systems": systems}
@staticmethod
@@ -400,7 +402,7 @@ class ReportedChangesAreTheDiff(unittest.TestCase):
if not archive.is_file():
self.skipTest("no cached original for retropie")
config = load_platform_config("retropie", str(ROOT / "platforms"))
truth = export_native.current_truth("retropie", config, str(ROOT / "platforms"))
truth = current_truth("retropie", config, str(ROOT / "platforms"))
scraped = native_layer(config)
systems, report = build_native_model(truth, scraped)
exporter = discover_exporters()["retropie"]()
@@ -412,7 +414,7 @@ class ReportedChangesAreTheDiff(unittest.TestCase):
before = exporter.modules({relative: originals[relative]})[relative][1]
after = exporter.modules({relative: text})[relative][1]
gained |= exporter._listed(after) - exporter._listed(before)
changes = export_native.landed_changes(exporter, systems).records
changes = landed_changes(exporter, systems).records
reported = {c["name"].lower() for c in changes if c["kind"] == "added"}
self.assertEqual(reported, gained)
self.assertEqual(
@@ -460,7 +462,7 @@ class ThePageShowsEachValueBeforeAndAfter(unittest.TestCase):
self.assertNotIn(glyph, self.page)
def test_the_report_carries_every_change(self):
source = (ROOT / "scripts" / "export_native.py").read_text(encoding="utf-8")
source = (ROOT / "scripts" / "exporter" / "native.py").read_text(encoding="utf-8")
body = source[source.index("def export_platform("):source.index("def write_report(")]
self.assertIn('"changes": changes.records,', body)
@@ -569,7 +571,7 @@ class RemovalCandidatesNeedAReadingNoCoreAnswers(unittest.TestCase):
self.assertNotIn("no entry the platform declares is removed", page)
def test_the_report_carries_the_list(self):
source = (ROOT / "scripts" / "export_native.py").read_text(encoding="utf-8")
source = (ROOT / "scripts" / "exporter" / "native.py").read_text(encoding="utf-8")
body = source[source.index("def export_platform("):source.index("def write_report(")]
self.assertIn('"removal_candidates": candidates,', body)
@@ -666,7 +668,7 @@ class ADestinationDeclaredTwiceIsNamed(unittest.TestCase):
self.assertEqual(self._doubled(), [])
def test_the_run_counts_it_and_the_report_carries_it(self):
source = (ROOT / "scripts" / "export_native.py").read_text(encoding="utf-8")
source = (ROOT / "scripts" / "exporter" / "native.py").read_text(encoding="utf-8")
body = source[source.index("def export_platform("):source.index("def write_report(")]
self.assertIn('"doubled": doubled,', body)
self.assertIn("declared twice for two files", body)
+33 -38
View File
@@ -35,14 +35,8 @@ from model.platforms import load_platform_config, native_layer
from model.safeparse import parse_untrusted_xml
from exporter import discover_exporters
from exporter.base_exporter import BaseExporter
from export_native import (
SOURCES_INDEX,
collect_originals,
fetch,
landed_changes,
pinned_base,
source_key,
)
from exporter.originals import SOURCES_INDEX, collect_originals, fetch, pinned_base, source_key
from exporter.landed import landed_changes
from resolve.reconcile import NativeFile, NativeSystem, Report, build_native_model
REPO_ROOT = Path(__file__).resolve().parent.parent
@@ -694,11 +688,11 @@ class ExporterRegistry(unittest.TestCase):
self.assertTrue(exporter.needs_original())
def test_an_export_without_its_original_writes_nothing(self):
import export_native
from exporter.native import export_platform
with tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp") as tmp:
output = Path(tmp) / "out"
ok, messages = export_native.export_platform(
ok, messages = export_platform(
"retroarch", discover_exporters()["retroarch"],
REPO_ROOT / "dist" / "truth", output,
str(REPO_ROOT / "platforms"), Path(tmp) / "no-cache", False,
@@ -1013,27 +1007,27 @@ class PinnedRevision(unittest.TestCase):
"""Checked on five platforms by their base only: ROCKNIX's second
file, RetroDECK's manifests and RetroPie's tarball were never
looked at, and a URL that fell back to a branch passed."""
import export_native
from exporter.originals import unpinned, wanted_sources
for name, exporter_class in discover_exporters().items():
with self.subTest(platform=name):
config = native_layer(load_platform_config(name, str(REPO_ROOT / "platforms")))
systems, _ = build_native_model({}, config)
wanted = export_native.wanted_sources(exporter_class(), systems, config)
wanted = wanted_sources(exporter_class(), systems, config)
self.assertTrue(wanted)
self.assertEqual(export_native.unpinned(wanted, config), [])
self.assertEqual(unpinned(wanted, config), [])
def test_a_file_read_off_the_pinned_revision_is_named(self):
import export_native
from exporter.originals import unpinned
pinned = {"source": "https://raw.githubusercontent.com/o/r/v1.0/list.txt"}
self.assertEqual(export_native.unpinned(
self.assertEqual(unpinned(
{"list.txt": "https://raw.githubusercontent.com/o/r/v1.0/list.txt"}, pinned), [])
moved = export_native.unpinned(
moved = unpinned(
{"list.txt": "https://raw.githubusercontent.com/o/r/master/list.txt"}, pinned)
self.assertEqual(len(moved), 1)
self.assertIn("v1.0", moved[0])
bare = export_native.unpinned(
bare = unpinned(
{"x.json": "https://raw.githubusercontent.com/o/r/main/x.json"},
{"source": "https://github.com/RetroDECK/components"})
self.assertIn("names no revision", bare[0])
@@ -1090,14 +1084,14 @@ class CachedOriginal(unittest.TestCase):
"""A truncated index read as empty: the cached batocera-41 file was
served for a 43.1 URL, and the next download erased every other
platform's recorded URL."""
import export_native
from exporter.originals import SourcesIndexUnreadable
old = self._upstream("batocera-41.txt", "old")
target = self.cache / "plat" / "list.txt"
fetch(old, target, self.index)
self.index.write_text('{"plat/list.txt": "' + old + '",', encoding="utf-8")
new = self._upstream("batocera-43.txt", "new")
with self.assertRaises(export_native.SourcesIndexUnreadable) as caught:
with self.assertRaises(SourcesIndexUnreadable) as caught:
fetch(new, target, self.index)
self.assertIn("--refresh-cache", str(caught.exception))
self.assertTrue(self.index.read_text(encoding="utf-8").endswith(","))
@@ -1164,13 +1158,13 @@ class CachedOriginal(unittest.TestCase):
import fcntl
from unittest import mock
import export_native
from exporter import originals
url = self._upstream("v1.txt", "one")
target = self.cache / "plat" / "list.txt"
lock = self.index.with_name(f".{self.index.name}.lock")
held: list[bool] = []
write = export_native.write_bytes_atomic
write = originals.write_bytes_atomic
def probing(path, data):
with open(lock, "a") as handle:
@@ -1183,7 +1177,7 @@ class CachedOriginal(unittest.TestCase):
held.append(False)
write(path, data)
with mock.patch.object(export_native, "write_bytes_atomic", probing):
with mock.patch.object(originals, "write_bytes_atomic", probing):
fetch(url, target, self.index)
self.assertEqual(held, [True])
@@ -1221,12 +1215,12 @@ class CachedOriginal(unittest.TestCase):
import http.client
from unittest import mock
import export_native
from exporter import originals as exporter_originals
def cut(*_args, **_kwargs):
raise http.client.IncompleteRead(b"par")
with mock.patch.object(export_native, "fetch", cut):
with mock.patch.object(exporter_originals, "fetch", cut):
originals, missing = collect_originals(
_OneFileExporter("https://example.invalid/list.txt"), {}, self.cache, True
)
@@ -1557,7 +1551,7 @@ class AnExportLeavesNoStaleFile(unittest.TestCase):
holding the six files of the first run."""
def test_files_this_run_does_not_write_are_removed(self):
import export_native
from exporter.native import _remove_stale
with tempfile.TemporaryDirectory() as tmp:
root = Path(tmp) / "retropie"
@@ -1568,13 +1562,13 @@ class AnExportLeavesNoStaleFile(unittest.TestCase):
gone_dir.mkdir()
for path in (kept, stale, gone_dir / "pcsx-rearmed.sh"):
path.write_text("old", encoding="utf-8")
export_native._remove_stale(root, {"scriptmodules/libretrocores/lr-mgba.sh"})
_remove_stale(root, {"scriptmodules/libretrocores/lr-mgba.sh"})
self.assertTrue(kept.exists())
self.assertFalse(stale.exists())
self.assertFalse(gone_dir.exists())
def test_the_export_clears_before_it_writes(self):
source = (REPO_ROOT / "scripts" / "export_native.py").read_text()
source = (REPO_ROOT / "scripts" / "exporter" / "native.py").read_text()
body = source[source.index("def export_platform("):]
self.assertLess(body.index("_remove_stale("), body.index("_write_produced("))
@@ -1587,11 +1581,11 @@ class AnExportIsWrittenAsItsBytes(unittest.TestCase):
def test_bytes_mode_and_atomicity(self):
import stat
import export_native
from exporter.native import _write_produced
with tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp") as tmp:
root = Path(tmp)
export_native._write_produced(root, {
_write_produced(root, {
"FirmwareDatabase.cs": "a\r\nb\r\n",
"rocknix-systems": "#!/usr/bin/python\n",
}, {"rocknix-systems": 0o755})
@@ -1615,7 +1609,7 @@ class AnExportWithoutTruthIsRefused(unittest.TestCase):
uncorrected, said OK, and replaced the corrected export in exports/."""
def test_nothing_is_written_and_the_run_fails(self):
import export_native
from exporter.native import export_platform
exporter = discover_exporters()["batocera"]
with tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp") as tmp:
@@ -1623,7 +1617,7 @@ class AnExportWithoutTruthIsRefused(unittest.TestCase):
published = output / "batocera" / "batocera-systems"
published.parent.mkdir(parents=True)
published.write_text("corrected", encoding="utf-8")
ok, messages = export_native.export_platform(
ok, messages = export_platform(
"batocera", exporter, Path(tmp) / "no-truth", output,
str(REPO_ROOT / "platforms"), Path(tmp) / "no-cache", False,
)
@@ -1642,7 +1636,8 @@ class AnInvalidExportIsNotWritten(unittest.TestCase):
def test_the_published_file_stays(self):
from unittest import mock
import export_native
from exporter import native as exporter_native
from exporter.native import export_platform
if not (UPSTREAM_CACHE / "romm").exists():
self.skipTest("upstream cache not populated")
@@ -1653,10 +1648,10 @@ class AnInvalidExportIsNotWritten(unittest.TestCase):
published = output / "romm" / "known_bios_files.json"
published.parent.mkdir(parents=True)
published.write_text("published", encoding="utf-8")
with mock.patch.object(export_native, "load_inputs",
with mock.patch.object(exporter_native, "load_inputs",
return_value=({"systems": {}}, config)), \
mock.patch.object(exporter, "validate", return_value=["bad entry"]):
ok, messages = export_native.export_platform(
ok, messages = export_platform(
"romm", exporter, Path(tmp), output,
str(REPO_ROOT / "platforms"), UPSTREAM_CACHE, False,
)
@@ -1852,7 +1847,7 @@ class RommSizeIsNeverNone(unittest.TestCase):
def test_an_entry_the_truth_takes_without_a_size_stays_whole(self):
"""RomM compares the size before any hash: the new md5 beside the
old size never verified, and the report said the size was removed."""
from export_native import landed_changes
from exporter.landed import landed_changes
exporter, systems, _, data = self._export(524288)
self.assertEqual(
@@ -2012,17 +2007,17 @@ class MisterDatabaseComesBackAsWritten(unittest.TestCase):
)
def test_bytes_are_written_untouched(self):
import export_native
from exporter.native import _write_produced
with tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp") as tmp:
export_native._write_produced(Path(tmp), {"a.zip": b"PK\x03\x04\xff"}, {})
_write_produced(Path(tmp), {"a.zip": b"PK\x03\x04\xff"}, {})
self.assertEqual((Path(tmp) / "a.zip").read_bytes(), b"PK\x03\x04\xff")
def test_a_new_hash_without_a_size_leaves_the_entry_whole(self):
"""The Downloader checks each entry by size (fetch_file_worker.py:127):
the old size beside the new hash described no file, and the report
announced a size removal the database did not carry."""
from export_native import landed_changes
from exporter.landed import landed_changes
database = {"db_id": "bios_db", "files": {
"games/X/boot.rom": {"hash": "a" * 32, "size": 100, "url": "u"},
+1 -1
View File
@@ -34,7 +34,7 @@ SIBLING_IMPORTS: dict[str, frozenset[str]] = {
NOT_YET_PACKAGED = frozenset({
"archive_build", "auto_fetch", "autorun", "build_port", "campaign", "campaign_profiles",
"campaign_rules", "check_buildbot_system", "check_release_assets", "commit_rules", "core_probe",
"cross_reference", "dedup", "derivations", "export_native", "generate_event_schema",
"cross_reference", "dedup", "derivations", "generate_event_schema",
"generate_pack", "generate_readme", "generate_site", "manifestselect", "measurement_records",
"packextras", "packpaths", "packreadme", "packresolve", "packverify", "pin_installer",
"pr_checks", "provenance_report", "refresh_data_dirs",
+2 -2
View File
@@ -716,7 +716,7 @@ class UnreadableReleaseStopsTheScrape(unittest.TestCase):
self.assertRegex(recorded, f"(^|/){sha}(/|$)")
def test_the_export_reads_the_recorded_tarball(self):
from export_native import _tarball_at
from exporter.originals import _tarball_at
branch = "https://codeload.github.com/RetroPie/RetroPie-Setup/tar.gz/refs/heads/master"
pinned = "https://codeload.github.com/RetroPie/RetroPie-Setup/tar.gz/" + "a" * 40
@@ -725,7 +725,7 @@ class UnreadableReleaseStopsTheScrape(unittest.TestCase):
self.assertEqual(_tarball_at(branch, other), "")
def test_the_export_reads_every_component_at_the_recorded_tree(self):
from export_native import pinned_base
from exporter.originals import pinned_base
sha = "c" * 40
base = pinned_base(