From 75d39f32332ff6ed9b67ce3b08baae3f1ca42c69 Mon Sep 17 00:00:00 2001 From: Martin Matous Date: Tue, 25 Mar 2025 21:47:48 +0100 Subject: [PATCH] kernel-update: fix symlink creation Signed-off-by: Martin Matous --- kernel-update.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel-update.py b/kernel-update.py index d2776b1..07c01d4 100755 --- a/kernel-update.py +++ b/kernel-update.py @@ -28,7 +28,9 @@ def update_config(old_dir: Path, new_dir: Path, make_cmd: list[str]) -> None: shutil.copy2(old_config, new_config) print(f'Setting symlink to {new_dir}') - (SRC_DIR / 'linux').symlink_to(new_dir, target_is_directory=True) + new_symlink = SRC_DIR / 'linux.updated' + new_symlink.symlink_to(new_dir, target_is_directory=True) + new_symlink.rename(SRC_DIR / 'linux') print('Migrating config options') migrate = [*make_cmd, '--directory', new_dir.as_posix(), 'oldconfig'] subprocess.run(migrate, check=True)