rename a make.conf key to make_conf due to bash variable name restrictions
authorBrian Dolbec <dolsen@gentoo.org>
Tue, 22 Jan 2013 08:39:18 +0000 (00:39 -0800)
committerBrian Dolbec <dolsen@gentoo.org>
Sat, 2 Mar 2013 02:27:19 +0000 (18:27 -0800)
catalyst/base/stagebase.py
catalyst/defaults.py

index 4b24d9a706464438c64a1a0a286dcc3d6078dfba..405f47aba2380f5bc84b7dc36e119cd568ce59f5 100644 (file)
@@ -1009,7 +1009,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
        def chroot_setup(self):
                self.makeconf=read_makeconf(normpath(self.settings["chroot_path"]+
-                       self.settings["make.conf"]))
+                       self.settings["make_conf"]))
                self.override_cbuild()
                self.override_chost()
                self.override_cflags()
@@ -1056,7 +1056,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
                        """ Modify and write out make.conf (for the chroot) """
                        makepath = normpath(self.settings["chroot_path"] +
-                               self.settings["make.conf"])
+                               self.settings["make_conf"])
                        cmd("rm -f " + makepath,\
                                "Could not remove " + makepath, env=self.env)
                        myf=open(makepath, "w")
@@ -1106,9 +1106,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
                        myf.close()
                        makepath = normpath(self.settings["chroot_path"] +
-                               self.settings["make.conf"])
+                               self.settings["make_conf"])
                        cmd("cp " + makepath + " " + makepath + ".catalyst",\
-                               "Could not backup " + self.settings["make.conf"],env=self.env)
+                               "Could not backup " + self.settings["make_conf"],env=self.env)
                        touch(self.settings["autoresume_path"]+"chroot_setup")
 
        def fsscript(self):
@@ -1154,7 +1154,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                        cmd("rm -rf " + overlay,
                                "Could not remove " + self.settings["local_overlay"], env=self.env)
                        cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
-                               self.settings["make.conf"],\
+                               self.settings["make_conf"],\
                                "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
 
                """ Clean up old and obsoleted files in /etc """
index c52ab737908dbeb9b22d7573f2114bc32c75a9ba..f386b436ac3819a81965263b7b8098531889e8cf 100644 (file)
@@ -57,6 +57,8 @@ contents_definitions = {
 }
 
 
+# please try to avoid using "-", "/", "." in key names
+# due to them not being compatible in the bash environment
 confdefaults={
        "storedir": "/var/tmp/catalyst",
        "sharedir": "/usr/lib/catalyst",
@@ -67,13 +69,14 @@ confdefaults={
        "packagedir": "/usr/portage/packages",
        "port_tmpdir": "/var/tmp/portage",
        "local_overlay": "/usr/local/portage",
-       "make.conf": "/etc/portage/make.conf",
+       "make_conf": "/etc/portage/make.conf",
        "options": set(),
        "snapshot_name": "portage-",
        "snapshot_cache": "/var/tmp/catalyst/snapshot_cache",
        "hash_function": "crc32",
        }
 
+
 target_mounts = {
        "proc": "/proc",
        "dev": "/dev",