From: Daan De Meyer Date: Thu, 4 Jul 2024 12:30:52 +0000 (+0200) Subject: Fix fixup_vmlinuz_location() X-Git-Tag: v25~350^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38d53f109365d49ca3aafb5f0d42d0db6b72e79a;p=thirdparty%2Fmkosi.git Fix fixup_vmlinuz_location() We have to resolve the path before we check if the symlink is relative to /boot. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 4fae7aecf..5907fb60c 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1737,7 +1737,7 @@ def fixup_vmlinuz_location(context: Context) -> None: continue # Some distributions (OpenMandriva) symlink /usr/lib/modules//vmlinuz to /boot/vmlinuz-, so # get rid of the symlink and copy the actual vmlinuz to /usr/lib/modules/. - 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)