diff --git a/src/cmd-buildextend-live b/src/cmd-buildextend-live index a11111679d..24dac4a9b4 100755 --- a/src/cmd-buildextend-live +++ b/src/cmd-buildextend-live @@ -97,7 +97,12 @@ name_version = f'{base_name}-{args.build}' # to shorten this more intelligently, otherwise we truncate the # version which may impede uniqueness. volid = name_version[0:32] - +kernel_name = f'{base_name}-{args.build}-live-kernel-{basearch}' +initramfs_name = f'{base_name}-{args.build}-live-initramfs.{basearch}.img' +rootfs_name = f'{base_name}-{args.build}-live-rootfs.{basearch}.img' +kernel_file = os.path.join(builddir, kernel_name) +initramfs_file = os.path.join(builddir, initramfs_name) +rootfs_file = os.path.join(builddir, rootfs_name) # The kernel requires that uncompressed cpio archives appended to an initrd # start on a 4-byte boundary. If there's misalignment, it stops unpacking # and says: @@ -763,13 +768,6 @@ boot } }) shutil.move(tmpisofile, f"{builddir}/{iso_name}") - - kernel_name = f'{base_name}-{args.build}-live-kernel-{basearch}' - initramfs_name = f'{base_name}-{args.build}-live-initramfs.{basearch}.img' - rootfs_name = f'{base_name}-{args.build}-live-rootfs.{basearch}.img' - kernel_file = os.path.join(builddir, kernel_name) - initramfs_file = os.path.join(builddir, initramfs_name) - rootfs_file = os.path.join(builddir, rootfs_name) shutil.copyfile(os.path.join(tmpisoimagespxe, kernel_img), kernel_file) shutil.move(pxe_initramfs, initramfs_file) shutil.move(pxe_rootfs, rootfs_file)