modules/generic_stage_target.py: Use a 'local_overlay' setting instead of hard-coding...
authorBrian Dolbec <dolsen@gentoo.org>
Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)
committerMatt Turner <mattst88@gmail.com>
Sun, 15 Dec 2013 04:17:23 +0000 (20:17 -0800)
W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
modules/generic_stage_target.py

index fc54fbf263f82bd5583101cf408029b79b26111c..6ee35d286ead28e91cd373aa162232d083bab3ee 100644 (file)
@@ -872,10 +872,10 @@ class generic_stage_target(generic_target):
                                if os.path.exists(x):
                                        print "Copying overlay dir " +x
                                        cmd("mkdir -p "+self.settings["chroot_path"]+\
-                                               "/usr/local/portage",\
+                                               self.settings["local_overlay"],\
                                                "Could not make portage_overlay dir",env=self.env)
                                        cmd("cp -R "+x+"/* "+self.settings["chroot_path"]+\
-                                               "/usr/local/portage",\
+                                               self.settings["local_overlay"],\
                                                "Could not copy portage_overlay",env=self.env)
 
        def root_overlay(self):
@@ -1116,9 +1116,9 @@ class generic_stage_target(generic_target):
                                "Could not replace /etc/hosts",env=self.env)
 
                """ Remove our overlay """
-               if os.path.exists(self.settings["chroot_path"]+"/usr/local/portage"):
-                       cmd("rm -rf "+self.settings["chroot_path"]+"/usr/local/portage",\
-                               "Could not remove /usr/local/portage",env=self.env)
+               if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]):
+                       cmd("rm -rf " + self.settings["chroot_path"] + self.settings["local_overlay"],
+                               "Could not remove " + self.settings["local_overlay"], env=self.env)
                        cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
                                "/etc/portage/make.conf",\
                                "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)