image-live.bbclass/image-vm.bbclass: remove duplicated code

Move the common code to live_vm_common.bbclass and remove duplicated ones.

(From OE-Core rev: 4a70cc59a0350f06d4cc48c12c3053a39191ba07)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang
2016-03-30 00:23:11 -07:00
committed by Richard Purdie
parent d6d75260fa
commit 4d1df2cfe8
4 changed files with 71 additions and 112 deletions

View File

@@ -544,15 +544,3 @@ do_bundle_initramfs () {
}
addtask bundle_initramfs after do_image_complete
# Some of the vars for vm and live image are conflicted, this function
# is used for fixing the problem.
def set_live_vm_vars(d, suffix):
vars = ['GRUB_CFG', 'SYSLINUX_CFG', 'ROOT', 'LABELS', 'INITRD']
for var in vars:
var_with_suffix = var + '_' + suffix
if d.getVar(var, True):
bb.warn('Found potential conflicted var %s, please use %s rather than %s' % \
(var, var_with_suffix, var))
elif d.getVar(var_with_suffix, True):
d.setVar(var, d.getVar(var_with_suffix, True))