commit: cde8a57f8c7b40e66cc6fda6f923bd8b2f21297c
Author: Doug Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Tue Jul 30 00:00:40 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 11:05:56 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cde8a57f
stagebase: clean up config_profile_link
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/base/stagebase.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2dcf6d71..df2da7ef 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -864,18 +864,23 @@ class StageBase(TargetBase, ClearBase, GenBase):
def config_profile_link(self):
log.info('Configuring profile link...')
- make_profile = Path(self.settings['chroot_path'] +
self.settings['port_conf'],
- 'make.profile')
+
+ chroot_port_conf = Path(self.settings['chroot_path'] +
self.settings['port_conf'])
+ make_profile = chroot_port_conf / 'make.profile'
make_profile.unlink(missing_ok=True)
+
try:
repo_name, target_profile =
self.settings['target_profile'].split(":", 1)
except ValueError:
repo_name = self.settings['repo_name']
target_profile = self.settings['target_profile']
- make_profile.symlink_to(Path('../..' + self.settings['repo_basedir'],
- repo_name,
- 'profiles',
- target_profile),
+
+ chroot_profile_path = Path(self.settings['chroot_path'] +
self.settings['repo_basedir'],
+ repo_name,
+ 'profiles',
+ target_profile)
+
+ make_profile.symlink_to(os.path.relpath(chroot_profile_path,
chroot_port_conf),
target_is_directory=True)
def setup_confdir(self):