diff options
Diffstat (limited to 'meta/classes/image-vm.bbclass')
| -rw-r--r-- | meta/classes/image-vm.bbclass | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass index 32c6550037..35c9244e9b 100644 --- a/meta/classes/image-vm.bbclass +++ b/meta/classes/image-vm.bbclass @@ -106,19 +106,15 @@ build_boot_dd() { cd ${IMGDEPLOYDIR} - if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ]; then - rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect) - fi - ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect } python do_bootdirectdisk() { validate_disk_signature(d) set_live_vm_vars(d, 'VM') - if d.getVar("PCBIOS", True) == "1": + if d.getVar("PCBIOS") == "1": bb.build.exec_func('build_syslinux_cfg', d) - if d.getVar("EFI", True) == "1": + if d.getVar("EFI") == "1": bb.build.exec_func('build_efi_cfg', d) bb.build.exec_func('build_boot_dd', d) } @@ -136,7 +132,7 @@ def generate_disk_signature(): def validate_disk_signature(d): import re - disk_signature = d.getVar("DISK_SIGNATURE", True) + disk_signature = d.getVar("DISK_SIGNATURE") if not re.match(r'^[0-9a-fA-F]{8}$', disk_signature): bb.fatal("DISK_SIGNATURE '%s' must be an 8 digit hex string" % disk_signature) @@ -147,10 +143,6 @@ run_qemu_img (){ type="$1" qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type - if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type ]; then - rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type) - fi - ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type } create_vmdk_image () { @@ -166,11 +158,11 @@ create_qcow2_image () { } python do_vmimg() { - if 'vmdk' in d.getVar('IMAGE_FSTYPES', True): + if 'vmdk' in d.getVar('IMAGE_FSTYPES'): bb.build.exec_func('create_vmdk_image', d) - if 'vdi' in d.getVar('IMAGE_FSTYPES', True): + if 'vdi' in d.getVar('IMAGE_FSTYPES'): bb.build.exec_func('create_vdi_image', d) - if 'qcow2' in d.getVar('IMAGE_FSTYPES', True): + if 'qcow2' in d.getVar('IMAGE_FSTYPES'): bb.build.exec_func('create_qcow2_image', d) } |
