Gentoo Archives: gentoo-catalyst

From: "W. Trevor King" <wking@×××××××.us>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] Re: [PATCH 2/5] generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror
Date: Wed, 05 Mar 2014 04:47:52
Message-Id: 20140305044747.GD25297@odin.tremily.us
In Reply to: [gentoo-catalyst] [PATCH 2/5] generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror by Brian Dolbec
1 On Sun, Mar 02, 2014 at 03:00:59PM -0800, Brian Dolbec wrote:
2 > def set_snapcache_path(self):
3 > + self.settings["snapshot_cache_path"] = \
4 > + normpath(self.settings["snapshot_cache"] + "/" +
5 > + self.settings["snapshot"])
6 > if "SNAPCACHE" in self.settings:
7 > - self.settings["snapshot_cache_path"] = \
8 > - normpath(self.settings["snapshot_cache"] + "/" +
9 > - self.settings["snapshot"])
10
11 If we're getting snapshot_cache_path key errors, I think the solution
12 is to protect those call sites with:
13
14 if 'SNAPCACHE' in self.settings:
15
16 blocks, not to define a snapcache-only setting for folks who are not
17 using snapcaches. There are not particularly many snapshot_cache_path
18 references in catalyst. Grepping through them, the following looks
19 suspicious:
20
21 catalyst/targets/generic_stage_target.py-215- self.mountmap["portdir"] = normpath("/".join([
22 catalyst/targets/generic_stage_target.py:216: self.settings["snapshot_cache_path"],
23 catalyst/targets/generic_stage_target.py-217- self.settings["repo_name"],
24 catalyst/targets/generic_stage_target.py-218- ]))
25 catalyst/targets/generic_stage_target.py-219- if "SNAPCACHE" not in self.settings:
26
27 Everything else looks fine. So what should portdir be if SNAPCACHE
28 isn't set?
29
30 Cheers,
31 Trevor
32
33 --
34 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
35 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies