[OE-core] Question for OE variable "LABELS"

Jianxun Zhang jianxun.zhang at linux.intel.com
Wed Oct 19 20:51:29 UTC 2016


The current OE document has this LABELS variable and OE has some code to support its usage. But if I just set LABELS in a BSP conf or local.conf file, the build will show the warning message:

WARNING: core-image-minimal-1.0-r0 do_bootimg: Found potential conflicted var LABELS, please use LABELS_LIVE rather than LABELS"

Does anyone know a “proper” usage of LABELS so it won’t trigger the warning message? From the code I dig out, it doesn’t seem so:

in meta//classes/live-vm-common.bbclass:

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))

Notice there is another corner case of false alarm when LABELS have same value of LABEL_LIVE or VM.

I can have a small patch to change it, but hope to know the intended behaviors first.

Thanks


More information about the Openembedded-core mailing list