diff options
author | 2020-07-24 15:35:09 +0300 | |
---|---|---|
committer | 2020-07-24 16:33:53 +0300 | |
commit | 9f8dec72a371f7b60af1b1669d112c0d5c13b728 (patch) | |
tree | 0b14280d12d13733b97964e316ac3c97c53a658a | |
parent | Add "interpreter" parameter for qemu-user build support (diff) | |
download | catalyst-9f8dec72a371f7b60af1b1669d112c0d5c13b728.tar.gz catalyst-9f8dec72a371f7b60af1b1669d112c0d5c13b728.tar.bz2 catalyst-9f8dec72a371f7b60af1b1669d112c0d5c13b728.zip |
stagebase: Extend cleanup logic to more directories
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>
-rw-r--r-- | catalyst/base/stagebase.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 0ddd359f..afeda722 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -1253,13 +1253,19 @@ class StageBase(TargetBase, ClearBase, GenBase): if ("portage_prefix" in self.settings and "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.warning("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"]) if os.path.exists(overlay): |