fix: keep the digest cache beside the scanned tree

The cache path and .gitignore were read from the working directory: a
scan of a copy replaced the repository's cache with the copy's entries,
keyed bios/... like the real ones, and the next run rehashed everything.
Both now come from the tree holding bios/, and kept release assets are
restored under it.
This commit is contained in:
Abdessamad Derraz committed 2026-11-22 00:58:05 +01:00
1 parent 936e9ceed9
commit 940893d7d4
6 files changed
+70 -24

No files matched your search

+5 -2
View File
@@ -492,9 +492,12 @@ class RestoredReleaseAssets(unittest.TestCase):
self._tmp.cleanup()
def _restore(self, *, offline: bool = False) -> None:
entries = {self.sha1: {"name": "FW.PUP", "path": str(self.target)}}
# Entries name paths relative to the tree holding bios/, never to
# the working directory.
path = "bios/Sony/PS3/FW.PUP"
entries = {self.sha1: {"name": "FW.PUP", "path": path}}
self.releaseassets.restore_release_assets(
entries, {str(self.target)}, offline=offline
entries, {path}, self.tmp, offline=offline
)
def test_a_fetched_asset_returns_to_its_registered_path(self):