Gentoo Archives: gentoo-catalyst

From: "W. Trevor King" <wking@×××××××.us>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH] generic_stage_target: Don't set mountmap['portdir'] without SNAPCACHE
Date: Mon, 24 Mar 2014 05:08:18
Message-Id: 20140324050814.GA4008@odin.tremily.us
In Reply to: Re: [gentoo-catalyst] [PATCH] generic_stage_target: Don't set mountmap['portdir'] without SNAPCACHE by Brian Dolbec
1 On Sat, Mar 22, 2014 at 03:39:34PM -0700, Brian Dolbec wrote:
2 > On Sat, 8 Mar 2014 10:25:09 -0800 "W. Trevor King" wrote:
3 > > if "SNAPCACHE" not in self.settings:
4 > > + self.mountmap["portdir"] =
5 > > normpath("/".join([
6 > > + self.settings["snapshot_cache_path"],
7 > > + self.settings["repo_name"],
8 > > + ]))
9 > > self.mounts.remove("portdir")
10 > > #self.mountmap["portdir"] = None
11 > > if os.uname()[0] == "Linux":
12 >
13 > Not quite correct. Note the not in that if...
14
15 Ah, good point ;).
16
17 > diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
18 > index 9c39d00..eaf2c1f 100644
19 > @@ -215,13 +215,14 @@ class generic_stage_target(generic_target):
20 > self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
21 > # update them from settings
22 > self.mountmap["distdir"] = self.settings["distdir"]
23 > - self.mountmap["portdir"] = normpath("/".join([
24 > - self.settings["snapshot_cache_path"],
25 > - self.settings["repo_name"],
26 > - ]))
27 > if "SNAPCACHE" not in self.settings:
28 > self.mounts.remove("portdir")
29 > - #self.mountmap["portdir"] = None
30 > + self.mountmap["portdir"] = None
31 > + else:
32 > + self.mountmap["portdir"] = normpath("/".join([
33 > + self.settings["snapshot_cache_path"],
34 > + self.settings["repo_name"],
35 > + ]))
36
37 This looks good to me.
38
39 Cheers,
40 Trevor
41
42 --
43 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
44 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachments

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