1 |
On Thu, 8 Oct 2015 18:52:57 -0400 |
2 |
Mike Frysinger <vapier@g.o> wrote: |
3 |
|
4 |
> When we write the hash, we do so by using: |
5 |
> snapshot_cache_path + / + catalyst-hash |
6 |
> |
7 |
> But when we read it, we do so by: |
8 |
> snapshot_cache_path + catalyst-hash |
9 |
> |
10 |
> If the path lacks a trailing /, then we never read the correct hash |
11 |
> file. The current helper returns -1 on missing file errors which is |
12 |
> compared against the existing hash. In essence, we always trigger a |
13 |
> cache miss. |
14 |
> |
15 |
> Add the missing / to the read logic. |
16 |
> --- |
17 |
> catalyst/base/stagebase.py | 2 +- |
18 |
> 1 file changed, 1 insertion(+), 1 deletion(-) |
19 |
> |
20 |
> diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
21 |
> index f81c51b..a2a8520 100644 |
22 |
> --- a/catalyst/base/stagebase.py |
23 |
> +++ b/catalyst/base/stagebase.py |
24 |
> @@ -817,7 +817,7 @@ class StageBase(TargetBase, ClearBase, GenBase): |
25 |
> if "snapcache" in self.settings["options"]: |
26 |
> snapshot_cache_hash=\ |
27 |
> read_from_clst(self.settings["snapshot_cache_path"]+\ |
28 |
> - "catalyst-hash") |
29 |
> + "/" + "catalyst-hash") |
30 |
> unpack_info['mode'] = |
31 |
> self.decompressor.determine_mode( unpack_info['source']) |
32 |
> |
33 |
|
34 |
|
35 |
works for me. It was probably a bug introduced by me removing trailing |
36 |
slashes in pretty much all variables. I kept running into issues with |
37 |
slashes causing problems. Sometimes they were needed other times they |
38 |
caused failures. |
39 |
|
40 |
It was easier to remove them by default then add them only when needed. |
41 |
-- |
42 |
Brian Dolbec <dolsen> |