From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DDEE2138AE9 for ; Fri, 29 Dec 2017 00:35:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2557DE0E61; Fri, 29 Dec 2017 00:35:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 05664E0E61 for ; Fri, 29 Dec 2017 00:35:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9DA09341301 for ; Fri, 29 Dec 2017 00:35:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E2680AE84 for ; Fri, 29 Dec 2017 00:35:21 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1514507670.d1dbb555a08951b65c21f900ace740b1a76efa51.dolsen@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: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: d1dbb555a08951b65c21f900ace740b1a76efa51 X-VCS-Branch: master Date: Fri, 29 Dec 2017 00:35:21 +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: 86d37222-0ccb-4efc-8b7b-b9b3e1c3be39 X-Archives-Hash: 6b27528df0d0af8357e98f316b9be48b commit: d1dbb555a08951b65c21f900ace740b1a76efa51 Author: Brian Dolbec gentoo org> AuthorDate: Thu Dec 28 20:58:29 2017 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Fri Dec 29 00:34:30 2017 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d1dbb555 stagebase.py: Fix cleaning portage_prefix errors Remove outer [ ] pair in the pjoin. Remove leading / in the "/etc/portage/package.%s" Ben Kohler gmail.com> Add "accept_keywords" package.* entry to clean. Ben Kohler gmail.com> Add extra logging info. Change from using chroot_path to destpath in case it is different (stage1). Use normpath() on some other cleanables to remove "//"'s catalyst/base/stagebase.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index a6a32f5a..8f9a5dbd 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -1207,7 +1207,7 @@ class StageBase(TargetBase, ClearBase, GenBase): else: for x in self.settings["cleanables"]: log.notice('Cleaning chroot: %s', x) - clear_path(self.settings["destpath"] + x) + clear_path(normpath(self.settings["destpath"] + x)) # Put /etc/hosts back into place hosts_file = self.settings['chroot_path'] + '/etc/hosts' @@ -1217,15 +1217,18 @@ class StageBase(TargetBase, ClearBase, GenBase): # optionally clean up portage configs if ("portage_prefix" in self.settings and "sticky-config" not in self.settings["options"]): - for _dir in "keywords", "mask", "unmask", "use": - target = pjoin([self.settings['chroot_path'], - "/etc/portage/package.%s" % _dir, - self.settings["portage_prefix"]]) + log.debug("clean(), portage_preix = %s, no sticky-config", self.settings["portage_prefix"]) + for _dir in "accept_keywords", "keywords", "mask", "unmask", "use": + target = pjoin(self.settings["destpath"], + "etc/portage/package.%s" % _dir, + self.settings["portage_prefix"]) + log.notice("Clearing portage_prefix target: %s", target) clear_path(target) # Remove our overlay - if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]): - clear_path(self.settings["chroot_path"] + self.settings["local_overlay"]) + overlay = normpath(self.settings["chroot_path"] + self.settings["local_overlay"]) + if os.path.exists(overlay): + clear_path(overlay) # re-write the make.conf to be sure it is clean self.write_make_conf(setup=False)