From: Daan De Meyer Date: Sun, 23 Jun 2024 11:41:25 +0000 (+0200) Subject: Skip vmlinuz in /boot without matching dir in /usr/lib/modules X-Git-Tag: v24~91^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66e91c8a56d1418e1b282d8bb39aa8e9f1adc2d8;p=thirdparty%2Fmkosi.git Skip vmlinuz in /boot without matching dir in /usr/lib/modules Fixes #2796 --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index a91da37b0..f9cc9c0b6 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1697,6 +1697,8 @@ def fixup_vmlinuz_location(context: Context) -> None: for d in context.root.glob(f"boot/{type}-*"): kver = d.name.removeprefix(f"{type}-") vmlinuz = context.root / "usr/lib/modules" / kver / f"{type}" + if not vmlinuz.parent.exists(): + 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"):