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 BCFBB1381F3 for ; Thu, 23 Jul 2020 22:59:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E8E2EE083B; Thu, 23 Jul 2020 22:59:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 97251E083B for ; Thu, 23 Jul 2020 22:59:15 +0000 (UTC) Received: (nullmailer pid 28566 invoked by uid 1000); Thu, 23 Jul 2020 22:59:09 -0000 From: dilfridge@gentoo.org To: gentoo-catalyst@lists.gentoo.org Cc: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= Subject: [gentoo-catalyst] [PATCH] stagebase: Extend cleanup logic to more directories Date: Fri, 24 Jul 2020 01:58:57 +0300 Message-Id: <20200723225857.27242-1-dilfridge@gentoo.org> X-Mailer: git-send-email 2.26.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 47694689-775f-454b-8ac4-c4d4a485d9d1 X-Archives-Hash: a37da40f8c39ecf27713bb97b8c12961 From: Andreas K. Hüttel Needed for FEATURES management (switching off pid namespaces in qemu) and for testing build system hacks (like building python single-threaded to avoid hangs). Signed-off-by: Andreas K. Hüttel --- catalyst/base/stagebase.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 0d3a418b..a5c2345b 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -1138,13 +1138,19 @@ class StageBase(TargetBase, ClearBase, GenBase): "sticky-config" not in self.settings["options"]): log.debug("clean(), portage_preix = %s, no sticky-config", self.settings["portage_prefix"]) - for _dir in "accept_keywords", "keywords", "mask", "unmask", "use": + for _dir in "package.accept_keywords", "package.keywords", "package.mask", "package.unmask", "package.use", "package.env", "env": target = pjoin(self.settings["destpath"], - "etc/portage/package.%s" % _dir, + "etc/portage/%s" % _dir, self.settings["portage_prefix"]) log.notice("Clearing portage_prefix target: %s", target) clear_path(target) + # Remove hacks that should *never* go into stages + target = pjoin(self.settings["destpath"], "etc/portage/patches") + if os.path.exists(target): + log.warn("You've been hacking. Clearing target patches: %s", target) + clear_path(target) + # Remove our overlay overlay = normpath( self.settings["chroot_path"] + self.settings["local_overlay"]) -- 2.26.2