1 |
When we write the hash, we do so by using: |
2 |
snapshot_cache_path + / + catalyst-hash |
3 |
|
4 |
But when we read it, we do so by: |
5 |
snapshot_cache_path + catalyst-hash |
6 |
|
7 |
If the path lacks a trailing /, then we never read the correct hash |
8 |
file. The current helper returns -1 on missing file errors which is |
9 |
compared against the existing hash. In essence, we always trigger a |
10 |
cache miss. |
11 |
|
12 |
Add the missing / to the read logic. |
13 |
--- |
14 |
catalyst/base/stagebase.py | 2 +- |
15 |
1 file changed, 1 insertion(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
18 |
index f81c51b..a2a8520 100644 |
19 |
--- a/catalyst/base/stagebase.py |
20 |
+++ b/catalyst/base/stagebase.py |
21 |
@@ -817,7 +817,7 @@ class StageBase(TargetBase, ClearBase, GenBase): |
22 |
if "snapcache" in self.settings["options"]: |
23 |
snapshot_cache_hash=\ |
24 |
read_from_clst(self.settings["snapshot_cache_path"]+\ |
25 |
- "catalyst-hash") |
26 |
+ "/" + "catalyst-hash") |
27 |
unpack_info['mode'] = self.decompressor.determine_mode( |
28 |
unpack_info['source']) |
29 |
|
30 |
-- |
31 |
2.5.2 |