Gentoo Archives: gentoo-commits

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