1 |
From: Andreas K. Hüttel <dilfridge@g.o> |
2 |
|
3 |
Needed for FEATURES management (switching off pid namespaces in qemu) |
4 |
and for testing build system hacks (like building python single-threaded |
5 |
to avoid hangs). |
6 |
|
7 |
Signed-off-by: Andreas K. Hüttel <dilfridge@g.o> |
8 |
--- |
9 |
catalyst/base/stagebase.py | 10 ++++++++-- |
10 |
1 file changed, 8 insertions(+), 2 deletions(-) |
11 |
|
12 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
13 |
index 0d3a418b..a5c2345b 100644 |
14 |
--- a/catalyst/base/stagebase.py |
15 |
+++ b/catalyst/base/stagebase.py |
16 |
@@ -1138,13 +1138,19 @@ class StageBase(TargetBase, ClearBase, GenBase): |
17 |
"sticky-config" not in self.settings["options"]): |
18 |
log.debug("clean(), portage_preix = %s, no sticky-config", |
19 |
self.settings["portage_prefix"]) |
20 |
- for _dir in "accept_keywords", "keywords", "mask", "unmask", "use": |
21 |
+ for _dir in "package.accept_keywords", "package.keywords", "package.mask", "package.unmask", "package.use", "package.env", "env": |
22 |
target = pjoin(self.settings["destpath"], |
23 |
- "etc/portage/package.%s" % _dir, |
24 |
+ "etc/portage/%s" % _dir, |
25 |
self.settings["portage_prefix"]) |
26 |
log.notice("Clearing portage_prefix target: %s", target) |
27 |
clear_path(target) |
28 |
|
29 |
+ # Remove hacks that should *never* go into stages |
30 |
+ target = pjoin(self.settings["destpath"], "etc/portage/patches") |
31 |
+ if os.path.exists(target): |
32 |
+ log.warn("You've been hacking. Clearing target patches: %s", target) |
33 |
+ clear_path(target) |
34 |
+ |
35 |
# Remove our overlay |
36 |
overlay = normpath( |
37 |
self.settings["chroot_path"] + self.settings["local_overlay"]) |
38 |
-- |
39 |
2.26.2 |