On Sat,  8 Mar 2014 10:25:09 -0800
"W. Trevor King" <[email protected]> wrote:

> This patch should fix it.  Analysis in the commit message itself.
> 
> Cheers,
> Trevor
> 
>  catalyst/targets/generic_stage_target.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/catalyst/targets/generic_stage_target.py
> b/catalyst/targets/generic_stage_target.py index 2b3d7ce..1412ed5
> 100644 --- a/catalyst/targets/generic_stage_target.py
> +++ b/catalyst/targets/generic_stage_target.py
> @@ -212,11 +212,11 @@ class generic_stage_target(generic_target):
>               self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
>               # update them from settings
>               self.mountmap["distdir"] = self.settings["distdir"]
> -             self.mountmap["portdir"] = normpath("/".join([
> -                     self.settings["snapshot_cache_path"],
> -                     self.settings["repo_name"],
> -                     ]))
>               if "SNAPCACHE" not in self.settings:
> +                     self.mountmap["portdir"] =
> normpath("/".join([
> +                             self.settings["snapshot_cache_path"],
> +                             self.settings["repo_name"],
> +                             ]))
>                       self.mounts.remove("portdir")
>                       #self.mountmap["portdir"] = None
>               if os.uname()[0] == "Linux":


Not quite correct.  Note the not in that if...

It turns out it was a regression for the conversion in previous commits.
They original code had the "mountmap['usr/portage'] = ..." inside
 if "SNAPCACHE"...

 Anyway, here is the final fixed and rebased patch pushed to the
 pending branch:

diff --git a/catalyst/targets/generic_stage_target.py 
b/catalyst/targets/generic_stage_target.py
index 9c39d00..eaf2c1f 100644
@@ -215,13 +215,14 @@ class generic_stage_target(generic_target):
                self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
                # update them from settings
                self.mountmap["distdir"] = self.settings["distdir"]
-               self.mountmap["portdir"] = normpath("/".join([
-                       self.settings["snapshot_cache_path"],
-                       self.settings["repo_name"],
-                       ]))
                if "SNAPCACHE" not in self.settings:
                        self.mounts.remove("portdir")
-                       #self.mountmap["portdir"] = None
+                       self.mountmap["portdir"] = None
+               else:
+                       self.mountmap["portdir"] = normpath("/".join([
+                               self.settings["snapshot_cache_path"],
+                               self.settings["repo_name"],
+                               ]))
                if os.uname()[0] == "Linux":
                        self.mounts.append("devpts")
                        self.mounts.append("shm")

-- 
Brian Dolbec <dolsen>


Reply via email to