Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH] generic_stage_target: Don't set mountmap['portdir'] without SNAPCACHE
Date: Sat, 22 Mar 2014 22:39:51
Message-Id: 20140322153934.20c19756.dolsen@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH] generic_stage_target: Don't set mountmap['portdir'] without SNAPCACHE by "W. Trevor King"
1 On Sat, 8 Mar 2014 10:25:09 -0800
2 "W. Trevor King" <wking@×××××××.us> wrote:
3
4 > This patch should fix it. Analysis in the commit message itself.
5 >
6 > Cheers,
7 > Trevor
8 >
9 > catalyst/targets/generic_stage_target.py | 8 ++++----
10 > 1 file changed, 4 insertions(+), 4 deletions(-)
11 >
12 > diff --git a/catalyst/targets/generic_stage_target.py
13 > b/catalyst/targets/generic_stage_target.py index 2b3d7ce..1412ed5
14 > 100644 --- a/catalyst/targets/generic_stage_target.py
15 > +++ b/catalyst/targets/generic_stage_target.py
16 > @@ -212,11 +212,11 @@ class generic_stage_target(generic_target):
17 > self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
18 > # update them from settings
19 > self.mountmap["distdir"] = self.settings["distdir"]
20 > - self.mountmap["portdir"] = normpath("/".join([
21 > - self.settings["snapshot_cache_path"],
22 > - self.settings["repo_name"],
23 > - ]))
24 > if "SNAPCACHE" not in self.settings:
25 > + self.mountmap["portdir"] =
26 > normpath("/".join([
27 > + self.settings["snapshot_cache_path"],
28 > + self.settings["repo_name"],
29 > + ]))
30 > self.mounts.remove("portdir")
31 > #self.mountmap["portdir"] = None
32 > if os.uname()[0] == "Linux":
33
34
35 Not quite correct. Note the not in that if...
36
37 It turns out it was a regression for the conversion in previous commits.
38 They original code had the "mountmap['usr/portage'] = ..." inside
39 if "SNAPCACHE"...
40
41 Anyway, here is the final fixed and rebased patch pushed to the
42 pending branch:
43
44 diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
45 index 9c39d00..eaf2c1f 100644
46 @@ -215,13 +215,14 @@ class generic_stage_target(generic_target):
47 self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
48 # update them from settings
49 self.mountmap["distdir"] = self.settings["distdir"]
50 - self.mountmap["portdir"] = normpath("/".join([
51 - self.settings["snapshot_cache_path"],
52 - self.settings["repo_name"],
53 - ]))
54 if "SNAPCACHE" not in self.settings:
55 self.mounts.remove("portdir")
56 - #self.mountmap["portdir"] = None
57 + self.mountmap["portdir"] = None
58 + else:
59 + self.mountmap["portdir"] = normpath("/".join([
60 + self.settings["snapshot_cache_path"],
61 + self.settings["repo_name"],
62 + ]))
63 if os.uname()[0] == "Linux":
64 self.mounts.append("devpts")
65 self.mounts.append("shm")
66
67 --
68 Brian Dolbec <dolsen>

Replies