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 <matts...@gentoo.org> --- catalyst/base/stagebase.py | 3 ++- targets/support/chroot-functions.sh | 3 --- 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 -- 2.26.2