]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fix fixup_vmlinuz_location()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 4 Jul 2024 12:30:52 +0000 (14:30 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 22 Aug 2024 09:47:03 +0000 (11:47 +0200)
We have to resolve the path before we check if the symlink is relative
to /boot.

mkosi/__init__.py

index 4fae7aecfe676ea432ade8d64f1f868899d1a747..5907fb60c48f30b0963ad751780fc8fc7cc62342 100644 (file)
@@ -1737,7 +1737,7 @@ def fixup_vmlinuz_location(context: Context) -> None:
                 continue
             # Some distributions (OpenMandriva) symlink /usr/lib/modules/<kver>/vmlinuz to /boot/vmlinuz-<kver>, so
             # get rid of the symlink and copy the actual vmlinuz to /usr/lib/modules/<kver>.
-            if vmlinuz.is_symlink() and vmlinuz.is_relative_to("/boot"):
+            if vmlinuz.is_symlink() and vmlinuz.resolve().is_relative_to("/boot"):
                 vmlinuz.unlink()
             if not vmlinuz.exists():
                 shutil.copy2(d, vmlinuz)