mirror of
https://git.launchpad.net/livecd-rootfs
synced 2026-03-03 14:18:47 +00:00
Properly handle non -generic kernel and initramfs flavour
Determine used flavour by looking at the suffix of kernel. hwe is currently the only one that needs to have a prefix added so we can hardcode that.
This commit is contained in:
parent
301cf9622c
commit
0b30131aae
@ -278,19 +278,18 @@ class ISOBuilder:
|
||||
for path in artifact_dir.glob(f"{filename_prefix}*.{ext}"):
|
||||
newname = path.name[len(filename_prefix) :]
|
||||
link(path, newname)
|
||||
for suffix, prefix in (
|
||||
("-generic", ""),
|
||||
("-generic-hwe", "hwe-"),
|
||||
):
|
||||
if artifact_dir.joinpath(f"{filename_prefix}kernel{suffix}").exists():
|
||||
link(
|
||||
artifact_dir.joinpath(f"{filename_prefix}kernel{suffix}"),
|
||||
f"{prefix}{kernel_name}",
|
||||
)
|
||||
link(
|
||||
artifact_dir.joinpath(f"{filename_prefix}initrd{suffix}"),
|
||||
f"{prefix}initrd",
|
||||
)
|
||||
|
||||
for kernel_path in artifact_dir.glob(f"{filename_prefix}kernel*"):
|
||||
suffix = kernel_path.name[len(filename_prefix) + len("kernel") :]
|
||||
prefix = "hwe-" if suffix.endswith("-hwe") else ""
|
||||
link(
|
||||
artifact_dir.joinpath(f"{filename_prefix}kernel{suffix}"),
|
||||
f"{prefix}{kernel_name}",
|
||||
)
|
||||
link(
|
||||
artifact_dir.joinpath(f"{filename_prefix}initrd{suffix}"),
|
||||
f"{prefix}initrd",
|
||||
)
|
||||
self._extract_casper_uuids()
|
||||
|
||||
def make_bootable(self, project: str, capproject: str, subarch: str):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user