aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2021-01-17 22:09:30 -0500
committerMatt Turner <mattst88@gentoo.org>2021-01-23 11:19:07 -0500
commita500400592aaa309602331705b27cdbee8ae58c4 (patch)
treeaefd4c4899f8ab7c9108adf15eceab3fe89d5f0a
parentcatalyst: Store references to functions (diff)
downloadcatalyst-a5004005.tar.gz
catalyst-a5004005.tar.bz2
catalyst-a5004005.zip
catalyst: Call config_profile_link for all targets
This reverts the following two commits, which have no documented rationale. Revert "Set the profile by calling eselect." This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950. Revert "Drop config_profile_link from the action_sequence for the generic stage." This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997. Doing so improves the code in two ways: 1) it makes prepare_sequence identical across all targets, which will allow deduplicating some code 2) it no longer calls eselect profile each time chroot-functions.sh is sourced (even for those targets that were still calling config_profile_link) Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r--catalyst/base/stagebase.py3
-rwxr-xr-xtargets/support/chroot-functions.sh3
2 files changed, 2 insertions, 4 deletions
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 447e073d..53b0a224 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -500,6 +500,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
"""Set basic stage1, 2, 3 action sequences"""
self.prepare_sequence.extend([
self.unpack,
+ self.config_profile_link,
self.setup_confdir,
self.portage_overlay,
])
@@ -771,7 +772,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
log.info('Configuring profile link...')
make_profile = Path(self.settings['chroot_path'] + self.settings['port_conf'],
'make.profile')
- make_profile.unlink()
+ make_profile.unlink(missing_ok=True)
make_profile.symlink_to(Path('../..' + self.settings['repo_basedir'],
self.settings['repo_name'],
'profiles',
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
#!/bin/bash
-# Set the profile
-eselect profile set ${clst_target_profile}
-
# Trap these signals and kill ourselves if received
# Force ourselves to die if any of these signals are received
# most likely our controlling terminal is gone