From 463d98fe94041313e0cb4497081858ab5d9121f3 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Wed, 19 Dec 2012 18:56:04 -0800 Subject: [PATCH] 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 --- modules/generic_stage_target.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) -- 2.26.2