1 |
This reverts the following two commits, which have no documented |
2 |
rationale. |
3 |
|
4 |
Revert "Set the profile by calling eselect." |
5 |
|
6 |
This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950. |
7 |
|
8 |
Revert "Drop config_profile_link from the action_sequence for the generic stage." |
9 |
|
10 |
This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997. |
11 |
|
12 |
Doing so improves the code in two ways: |
13 |
|
14 |
1) it makes prepare_sequence identical across all targets, which will |
15 |
allow deduplicating some code |
16 |
2) it no longer calls eselect profile each time chroot-functions.sh |
17 |
is sourced (even for those targets that were still calling |
18 |
config_profile_link) |
19 |
|
20 |
Signed-off-by: Matt Turner <mattst88@g.o> |
21 |
--- |
22 |
catalyst/base/stagebase.py | 3 ++- |
23 |
targets/support/chroot-functions.sh | 3 --- |
24 |
2 files changed, 2 insertions(+), 4 deletions(-) |
25 |
|
26 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
27 |
index 447e073d..53b0a224 100644 |
28 |
--- a/catalyst/base/stagebase.py |
29 |
+++ b/catalyst/base/stagebase.py |
30 |
@@ -500,6 +500,7 @@ class StageBase(TargetBase, ClearBase, GenBase): |
31 |
"""Set basic stage1, 2, 3 action sequences""" |
32 |
self.prepare_sequence.extend([ |
33 |
self.unpack, |
34 |
+ self.config_profile_link, |
35 |
self.setup_confdir, |
36 |
self.portage_overlay, |
37 |
]) |
38 |
@@ -771,7 +772,7 @@ class StageBase(TargetBase, ClearBase, GenBase): |
39 |
log.info('Configuring profile link...') |
40 |
make_profile = Path(self.settings['chroot_path'] + self.settings['port_conf'], |
41 |
'make.profile') |
42 |
- make_profile.unlink() |
43 |
+ make_profile.unlink(missing_ok=True) |
44 |
make_profile.symlink_to(Path('../..' + self.settings['repo_basedir'], |
45 |
self.settings['repo_name'], |
46 |
'profiles', |
47 |
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh |
48 |
index 2aec018e..88465c31 100755 |
49 |
--- a/targets/support/chroot-functions.sh |
50 |
+++ b/targets/support/chroot-functions.sh |
51 |
@@ -1,8 +1,5 @@ |
52 |
#!/bin/bash |
53 |
|
54 |
-# Set the profile |
55 |
-eselect profile set ${clst_target_profile} |
56 |
- |
57 |
# Trap these signals and kill ourselves if received |
58 |
# Force ourselves to die if any of these signals are received |
59 |
# most likely our controlling terminal is gone |
60 |
-- |
61 |
2.26.2 |