Skip to content

Commit c3ec8ff

Browse files
committed
Remove unnecessary prefix variable
1 parent 02ff991 commit c3ec8ff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mkosi/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,6 @@ def install_unified_kernel(state: MkosiState, roothash: Optional[str]) -> None:
792792
if state.do_run_build_script:
793793
return
794794

795-
prefix = "boot"
796795

797796
with complete_step("Generating combined kernel + initrd boot file…"):
798797
for kver, kimg in gen_kernel_images(state):
@@ -804,12 +803,12 @@ def install_unified_kernel(state: MkosiState, roothash: Optional[str]) -> None:
804803
boot_count = f'+{state.root.joinpath("etc/kernel/tries").read_text().strip()}'
805804

806805
if state.config.image_version:
807-
boot_binary = state.root / prefix / f"EFI/Linux/{image_id}_{state.config.image_version}{boot_count}.efi"
806+
boot_binary = state.root / f"boot/EFI/Linux/{image_id}_{state.config.image_version}{boot_count}.efi"
808807
elif roothash:
809808
_, _, h = roothash.partition("=")
810-
boot_binary = state.root / prefix / f"EFI/Linux/{image_id}-{kver}-{h}{boot_count}.efi"
809+
boot_binary = state.root / f"boot/EFI/Linux/{image_id}-{kver}-{h}{boot_count}.efi"
811810
else:
812-
boot_binary = state.root / prefix / f"EFI/Linux/{image_id}-{kver}{boot_count}.efi"
811+
boot_binary = state.root / f"boot/EFI/Linux/{image_id}-{kver}{boot_count}.efi"
813812

814813
if state.root.joinpath("etc/kernel/cmdline").exists():
815814
cmdline = [state.root.joinpath("etc/kernel/cmdline").read_text().strip()]

0 commit comments

Comments
 (0)