1 |
On Tue, 4 Mar 2014 20:47:47 -0800 |
2 |
"W. Trevor King" <wking@×××××××.us> wrote: |
3 |
|
4 |
> On Sun, Mar 02, 2014 at 03:00:59PM -0800, Brian Dolbec wrote: |
5 |
> > def set_snapcache_path(self): |
6 |
> > + self.settings["snapshot_cache_path"] = \ |
7 |
> > + normpath(self.settings["snapshot_cache"] + "/" + |
8 |
> > + self.settings["snapshot"]) |
9 |
> > if "SNAPCACHE" in self.settings: |
10 |
> > - self.settings["snapshot_cache_path"] = \ |
11 |
> > - normpath(self.settings["snapshot_cache"] + "/" + |
12 |
> > - self.settings["snapshot"]) |
13 |
> |
14 |
> If we're getting snapshot_cache_path key errors, I think the solution |
15 |
> is to protect those call sites with: |
16 |
> |
17 |
> if 'SNAPCACHE' in self.settings: |
18 |
> |
19 |
> blocks, not to define a snapcache-only setting for folks who are not |
20 |
> using snapcaches. There are not particularly many snapshot_cache_path |
21 |
> references in catalyst. Grepping through them, the following looks |
22 |
> suspicious: |
23 |
> |
24 |
> catalyst/targets/generic_stage_target.py-215- self.mountmap["portdir"] = normpath("/".join([ |
25 |
> catalyst/targets/generic_stage_target.py:216: self.settings["snapshot_cache_path"], |
26 |
> catalyst/targets/generic_stage_target.py-217- self.settings["repo_name"], |
27 |
> catalyst/targets/generic_stage_target.py-218- ])) |
28 |
> catalyst/targets/generic_stage_target.py-219- if "SNAPCACHE" not in self.settings: |
29 |
> |
30 |
> Everything else looks fine. So what should portdir be if SNAPCACHE |
31 |
> isn't set? |
32 |
> |
33 |
> Cheers, |
34 |
> Trevor |
35 |
> |
36 |
|
37 |
Yeah, that's where it was failing. I don't think it matters to be |
38 |
honest. But I admit I haven't analyzed it thoroughly. I ran into this |
39 |
one while trying to track down other problems. So I quick fixed it. |
40 |
It's amazing the errors you find turning things off that are normally |
41 |
on. |
42 |
|
43 |
I'm open to a better alternative. I think the potential is there for |
44 |
more of these types of errors which depend on options selected. |
45 |
|
46 |
-- |
47 |
Brian Dolbec <dolsen> |