From: Brian Dolbec Date: Thu, 20 Dec 2012 02:56:04 +0000 (-0800) Subject: modules/generic_stage_target.py: Use a 'local_overlay' setting instead of hard-coding... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=463d98fe94041313e0cb4497081858ab5d9121f3;p=catalyst.git modules/generic_stage_target.py: Use a 'local_overlay' setting instead of hard-coding '/usr/local/portage' W. Trevor King: Refactored Git history for Brian Dolbec's content changes. Reviewed-by: Matt Turner Signed-off-by: W. Trevor King Signed-off-by: Brian Dolbec --- diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index fc54fbf2..6ee35d28 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -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)