From 5f0fce9876dea3f8fdc7127f7658239792cb526b Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sun, 15 Dec 2013 14:53:32 -0800 Subject: [PATCH] modules/generic_stage_target.py: Use portdir, distdir, ... instead of paths for keys If snapcache is enabled, self.mounts and self.mountmap had not been modified like they were if it was not enabled. Added a print statement for debugging to be converted to logging in the future. --- modules/generic_stage_target.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 3e60f72a..6c8cdbc2 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -174,10 +174,10 @@ class generic_stage_target(generic_target): """ Setup our mount points """ if "SNAPCACHE" in self.settings: - self.mounts=["/proc","/dev","/usr/portage","/usr/portage/distfiles","/var/tmp/portage"] - self.mountmap={"/proc":"/proc","/dev":"/dev","devpts":"/dev/pts", - "/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\ - "/usr/portage/distfiles":self.settings["distdir"],"/var/tmp/portage":"tmpfs"} + self.mounts=["proc", "dev", "portdir", "distdir", "port_tmpdir"] + self.mountmap={"proc": "/proc", "dev": "/dev", "devpts": "/dev/pts", + "portdir": self.settings["snapshot_cache_path"] + "/portage", + "distdir": self.settings["distdir"], "port_tmpdir": "tmpfs"} else: self.mounts = ["proc", "dev", "distdir", "port_tmpdir"] self.mountmap = {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts", @@ -904,7 +904,8 @@ class generic_stage_target(generic_target): os.makedirs(self.mountmap[x],0755) src=self.mountmap[x] - if "SNAPCACHE" in self.settings and x == "/usr/portage": + #print "bind(); src =", src + if "SNAPCACHE" in self.settings and x == "portdir": self.snapshot_lock_object.read_lock() if os.uname()[0] == "FreeBSD": if src == "/dev": -- 2.26.2