mirror of
https://git.launchpad.net/livecd-rootfs
synced 2026-03-06 07:38:48 +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}"):
|
for path in artifact_dir.glob(f"{filename_prefix}*.{ext}"):
|
||||||
newname = path.name[len(filename_prefix) :]
|
newname = path.name[len(filename_prefix) :]
|
||||||
link(path, newname)
|
link(path, newname)
|
||||||
for suffix, prefix in (
|
|
||||||
("-generic", ""),
|
for kernel_path in artifact_dir.glob(f"{filename_prefix}kernel*"):
|
||||||
("-generic-hwe", "hwe-"),
|
suffix = kernel_path.name[len(filename_prefix) + len("kernel") :]
|
||||||
):
|
prefix = "hwe-" if suffix.endswith("-hwe") else ""
|
||||||
if artifact_dir.joinpath(f"{filename_prefix}kernel{suffix}").exists():
|
link(
|
||||||
link(
|
artifact_dir.joinpath(f"{filename_prefix}kernel{suffix}"),
|
||||||
artifact_dir.joinpath(f"{filename_prefix}kernel{suffix}"),
|
f"{prefix}{kernel_name}",
|
||||||
f"{prefix}{kernel_name}",
|
)
|
||||||
)
|
link(
|
||||||
link(
|
artifact_dir.joinpath(f"{filename_prefix}initrd{suffix}"),
|
||||||
artifact_dir.joinpath(f"{filename_prefix}initrd{suffix}"),
|
f"{prefix}initrd",
|
||||||
f"{prefix}initrd",
|
)
|
||||||
)
|
|
||||||
self._extract_casper_uuids()
|
self._extract_casper_uuids()
|
||||||
|
|
||||||
def make_bootable(self, project: str, capproject: str, subarch: str):
|
def make_bootable(self, project: str, capproject: str, subarch: str):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user