Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Cc: Brian Dolbec <dolsen@g.o>
Subject: [gentoo-catalyst] [PATCH v3 1/6] modules/generic_stage_target.py: Use portdir, distdir, ... instead of paths for keys
Date: Fri, 03 Jan 2014 04:16:37
Message-Id: 1388722582-27657-2-git-send-email-dolsen@gentoo.org
In Reply to: [PATCH v3 0/6] "Re: [gentoo-catalyst] Patches to fix rebased patches already applied to current master. Version-2 by Brian Dolbec
1 If snapcache is enabled, self.mounts and self.mountmap had not been
2 modified like they were if it was not enabled.
3
4 Added a print statement for debugging to be converted to logging in
5 the future.
6 ---
7 modules/generic_stage_target.py | 11 ++++++-----
8 1 file changed, 6 insertions(+), 5 deletions(-)
9
10 diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
11 index 3e60f72..6c8cdbc 100644
12 --- a/modules/generic_stage_target.py
13 +++ b/modules/generic_stage_target.py
14 @@ -174,10 +174,10 @@ class generic_stage_target(generic_target):
15
16 """ Setup our mount points """
17 if "SNAPCACHE" in self.settings:
18 - self.mounts=["/proc","/dev","/usr/portage","/usr/portage/distfiles","/var/tmp/portage"]
19 - self.mountmap={"/proc":"/proc","/dev":"/dev","devpts":"/dev/pts",
20 - "/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\
21 - "/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
22 + self.mounts=["proc", "dev", "portdir", "distdir", "port_tmpdir"]
23 + self.mountmap={"proc": "/proc", "dev": "/dev", "devpts": "/dev/pts",
24 + "portdir": self.settings["snapshot_cache_path"] + "/portage",
25 + "distdir": self.settings["distdir"], "port_tmpdir": "tmpfs"}
26 else:
27 self.mounts = ["proc", "dev", "distdir", "port_tmpdir"]
28 self.mountmap = {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts",
29 @@ -904,7 +904,8 @@ class generic_stage_target(generic_target):
30 os.makedirs(self.mountmap[x],0755)
31
32 src=self.mountmap[x]
33 - if "SNAPCACHE" in self.settings and x == "/usr/portage":
34 + #print "bind(); src =", src
35 + if "SNAPCACHE" in self.settings and x == "portdir":
36 self.snapshot_lock_object.read_lock()
37 if os.uname()[0] == "FreeBSD":
38 if src == "/dev":
39 --
40 1.8.3.2

Replies