Fix a missed self.settings["repo_name"] migration
authorBrian Dolbec <dolsen@gentoo.org>
Thu, 19 Dec 2013 04:27:04 +0000 (20:27 -0800)
committerBrian Dolbec <dolsen@gentoo.org>
Fri, 3 Jan 2014 04:39:22 +0000 (20:39 -0800)
Use normpath() on it as well.
Fix the coding style in the lines touched.

modules/generic_stage_target.py

index 6c8cdbc245fdc07fe72759fb095ad711f4f8e3a6..ce43c79ea74a5794fc5ad6625798d961386cb187 100644 (file)
@@ -174,10 +174,18 @@ class generic_stage_target(generic_target):
 
                """ Setup our mount points """
                if "SNAPCACHE" in self.settings:
-                       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"}
+                       self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
+                       self.mountmap = {
+                               "dev": "/dev",
+                               "devpts": "/dev/pts",
+                               "distdir": self.settings["distdir"],
+                               "portdir": normpath("/".join([
+                                       self.settings["snapshot_cache_path"],
+                                       self.settings["repo_name"],
+                                       ])),
+                               "port_tmpdir": "tmpfs",
+                               "proc": "/proc",
+                               }
                else:
                        self.mounts = ["proc", "dev", "distdir", "port_tmpdir"]
                        self.mountmap = {"proc":"/proc", "dev":"/dev", "devpts":"/dev/pts",