From: Brian Dolbec Date: Sun, 15 Dec 2013 22:53:32 +0000 (-0800) Subject: modules/generic_stage_target.py: Use portdir, distdir, ... instead of paths for keys X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5f0fce9876dea3f8fdc7127f7658239792cb526b;p=catalyst.git 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. --- 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":