From: Daan De Meyer Date: Sat, 6 Jul 2024 20:03:07 +0000 (+0200) Subject: Extend grub binary search path X-Git-Tag: v24~52^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5035482ae4af9a63029275a9209d5b01cbb1493e;p=thirdparty%2Fmkosi.git Extend grub binary search path Debian has a bespoke setup where if only grub-pc-bin is installed, grub-bios-setup is installed in /usr/lib/i386-pc instead of in /usr/bin. Let's take that into account and look for binaries in /usr/lib/grub/i386-pc as well. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index f68f8ea44..793fb4343 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1277,7 +1277,11 @@ def find_grub_directory(context: Context, *, target: str) -> Optional[Path]: def find_grub_binary(config: Config, binary: str) -> Optional[Path]: assert "grub" not in binary - return config.find_binary(f"grub-{binary}", f"grub2-{binary}") + + # Debian has a bespoke setup where if only grub-pc-bin is installed, grub-bios-setup is installed in + # /usr/lib/i386-pc instead of in /usr/bin. Let's take that into account and look for binaries in + # /usr/lib/grub/i386-pc as well. + return config.find_binary(f"grub-{binary}", f"grub2-{binary}", f"/usr/lib/grub/i386-pc/grub-{binary}") def want_grub_efi(context: Context) -> bool: