commit: 836744689e0cc09a1a0a89b7272142d5dfb99bd4 Author: Ian Jordan <immoloism <AT> gmail <DOT> com> AuthorDate: Tue Jul 30 18:27:34 2024 +0000 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> CommitDate: Thu Aug 22 18:39:53 2024 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=83674468
Add Dist-kernel kconfig support Based on the orginal patch by oldfashionedcow to add the abilty for a user to set a custom kconfig for their livecd to be moved to /etc/kernel/config.d/ before sys-kernel/gentoo-kernel is emerged. Syntax is the same as the one used for Genkernel kconfigs. Closes: https://bugs.gentoo.org/936676 Co-authored-by: Rahul Sandh <rahul <AT> sandhuservices.dev> Co-authored-by: Christopher Fore <csfore <AT> posteo.net> Signed-off-by: Ian Jordan <immoloism <AT> gmail.com> Closes: https://github.com/gentoo/catalyst/pull/21 Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> catalyst/base/stagebase.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index a23b1d90..8a3d2af6 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -1707,8 +1707,13 @@ class StageBase(TargetBase, ClearBase, GenBase): raise CatalystError("Can't find kernel config: %s" % self.settings[key]) - shutil.copy(self.settings[key], - self.settings['chroot_path'] + '/var/tmp/' + kname + '.config') + if "boot/kernel/" + kname + "/distkernel" in self.settings: + os.makedirs(self.settings['chroot_path'] + '/etc//kernel/config.d') + shutil.copy(self.settings[key], + self.settings['chroot_path'] + '/etc//kernel/config.d') + else: + shutil.copy(self.settings[key], + self.settings['chroot_path'] + '/var/tmp/' + kname + '.config') def _copy_initramfs_overlay(self, kname): key = 'boot/kernel/' + kname + '/initramfs_overlay'
