From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EFFDC58973 for ; Thu, 11 Feb 2016 16:43:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C41C3E07E8; Thu, 11 Feb 2016 16:43:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 72FACE07E8 for ; Thu, 11 Feb 2016 16:43:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 582D3340BC4 for ; Thu, 11 Feb 2016 16:43:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ADEA38F6 for ; Thu, 11 Feb 2016 16:43:46 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1455198446.571fd55b3424a9f86e2d1f6a1af5ec1ac25fc7f4.vapier@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 571fd55b3424a9f86e2d1f6a1af5ec1ac25fc7f4 X-VCS-Branch: master Date: Thu, 11 Feb 2016 16:43:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b38cc598-8321-4d29-bec1-f34332924a68 X-Archives-Hash: e404ca4ba8be78bf4934aae35a870583 commit: 571fd55b3424a9f86e2d1f6a1af5ec1ac25fc7f4 Author: Mike Frysinger gentoo org> AuthorDate: Thu Feb 11 13:47:26 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Feb 11 13:47:26 2016 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=571fd55b stagebase: use ensure_dirs instead of cmd(mkdir -p) catalyst/base/stagebase.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index e291c30..002839e 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -881,8 +881,7 @@ class StageBase(TargetBase, ClearBase, GenBase): cmd("rm -f " + self.settings["chroot_path"] + self.settings["port_conf"] + "/make.profile", "Error zapping profile link",env=self.env) - cmd("mkdir -p " + self.settings["chroot_path"] + - self.settings["port_conf"]) + ensure_dirs(self.settings['chroot_path'] + self.settings['port_conf']) cmd("ln -sf ../.." + self.settings["portdir"] + "/profiles/" + self.settings["target_profile"] + " " + self.settings["chroot_path"] + @@ -913,9 +912,7 @@ class StageBase(TargetBase, ClearBase, GenBase): for x in self.settings["portage_overlay"]: if os.path.exists(x): log.info('Copying overlay dir %s', x) - cmd("mkdir -p "+self.settings["chroot_path"]+\ - self.settings["local_overlay"],\ - "Could not make portage_overlay dir",env=self.env) + ensure_dirs(self.settings['chroot_path'] + self.settings['local_overlay']) cmd("cp -a "+x+"/* "+self.settings["chroot_path"]+\ self.settings["local_overlay"],\ "Could not copy portage_overlay",env=self.env) @@ -1632,11 +1629,10 @@ class StageBase(TargetBase, ClearBase, GenBase): log.notice('Copying initramfs_overlay dir %s', self.settings['boot/kernel/' + kname + '/initramfs_overlay']) - cmd("mkdir -p "+\ - self.settings["chroot_path"]+\ - "/tmp/initramfs_overlay/"+\ - self.settings["boot/kernel/"+kname+\ - "/initramfs_overlay"],env=self.env) + ensure_dirs( + self.settings['chroot_path'] + + '/tmp/initramfs_overlay/' + + self.settings['boot/kernel/'+kname+'/initramfs_overlay']) cmd("cp -R "+self.settings["boot/kernel/"+\ kname+"/initramfs_overlay"]+"/* "+\