Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:pending commit in: modules/
Date: Mon, 30 Dec 2013 01:44:51
Message-Id: 1388308167.52c8009fcce0747cb37742c73271903f861c1209.dol-sen@gentoo
1 commit: 52c8009fcce0747cb37742c73271903f861c1209
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 15 22:53:32 2013 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Sun Dec 29 09:09:27 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=52c8009f
7
8 modules/generic_stage_target.py: Use portdir, distdir,... instead of paths for keys
9
10 If snapcache is enabled, self.mounts and self.mountmap had not been modified
11 like they were if it was not enabled.
12 Fix a missed self.mounts key change from a path as key.
13 original patch: 27b751ffd9594e0128a3d70f83c7af18dab03838
14 Added a print statement for debugging to be converted to logging in the future.
15
16 ---
17 modules/generic_stage_target.py | 11 ++++++-----
18 1 file changed, 6 insertions(+), 5 deletions(-)
19
20 diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
21 index 3e60f72..6c8cdbc 100644
22 --- a/modules/generic_stage_target.py
23 +++ b/modules/generic_stage_target.py
24 @@ -174,10 +174,10 @@ class generic_stage_target(generic_target):
25
26 """ Setup our mount points """
27 if "SNAPCACHE" in self.settings:
28 - self.mounts=["/proc","/dev","/usr/portage","/usr/portage/distfiles","/var/tmp/portage"]
29 - self.mountmap={"/proc":"/proc","/dev":"/dev","devpts":"/dev/pts",
30 - "/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\
31 - "/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"}
32 + self.mounts=["proc", "dev", "portdir", "distdir", "port_tmpdir"]
33 + self.mountmap={"proc": "/proc", "dev": "/dev", "devpts": "/dev/pts",
34 + "portdir": self.settings["snapshot_cache_path"] + "/portage",
35 + "distdir": self.settings["distdir"], "port_tmpdir": "tmpfs"}
36 else:
37 self.mounts = ["proc", "dev", "distdir", "port_tmpdir"]
38 self.mountmap = {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts",
39 @@ -904,7 +904,8 @@ class generic_stage_target(generic_target):
40 os.makedirs(self.mountmap[x],0755)
41
42 src=self.mountmap[x]
43 - if "SNAPCACHE" in self.settings and x == "/usr/portage":
44 + #print "bind(); src =", src
45 + if "SNAPCACHE" in self.settings and x == "portdir":
46 self.snapshot_lock_object.read_lock()
47 if os.uname()[0] == "FreeBSD":
48 if src == "/dev":