* [gentoo-catalyst] [PATCH] stagebase: Extend cleanup logic to more directories
@ 2020-07-23 22:58 dilfridge
0 siblings, 0 replies; only message in thread
From: dilfridge @ 2020-07-23 22:58 UTC (permalink / raw
To: gentoo-catalyst; +Cc: Andreas K. Hüttel
From: Andreas K. Hüttel <dilfridge@gentoo.org>
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 <dilfridge@gentoo.org>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-23 22:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-23 22:58 [gentoo-catalyst] [PATCH] stagebase: Extend cleanup logic to more directories dilfridge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox