public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [PATCH] stagebase: fix path to snapshot hash file
@ 2015-10-08 22:52 Mike Frysinger
  2015-10-08 22:57 ` [gentoo-catalyst] [PATCH] stagebase: replace read_from_clst with snakeoil Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mike Frysinger @ 2015-10-08 22:52 UTC (permalink / raw
  To: gentoo-catalyst

When we write the hash, we do so by using:
	snapshot_cache_path + / + catalyst-hash

But when we read it, we do so by:
	snapshot_cache_path + catalyst-hash

If the path lacks a trailing /, then we never read the correct hash
file.  The current helper returns -1 on missing file errors which is
compared against the existing hash.  In essence, we always trigger a
cache miss.

Add the missing / to the read logic.
---
 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f81c51b..a2a8520 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -817,7 +817,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "snapcache" in self.settings["options"]:
 			snapshot_cache_hash=\
 				read_from_clst(self.settings["snapshot_cache_path"]+\
-				"catalyst-hash")
+				"/" + "catalyst-hash")
 			unpack_info['mode'] = self.decompressor.determine_mode(
 				unpack_info['source'])
 
-- 
2.5.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-09  1:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-08 22:52 [gentoo-catalyst] [PATCH] stagebase: fix path to snapshot hash file Mike Frysinger
2015-10-08 22:57 ` [gentoo-catalyst] [PATCH] stagebase: replace read_from_clst with snakeoil Mike Frysinger
2015-10-09  0:23 ` [gentoo-catalyst] [PATCH v2] stagebase: fix path to snapshot hash file Mike Frysinger
2015-10-09  1:38   ` Brian Dolbec
2015-10-09  1:33 ` [gentoo-catalyst] [PATCH] " Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox