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

Robert Yang liezhi.yang at windriver.com
Thu Oct 20 07:11:36 UTC 2016


Hi Jianxun,

On 10/20/2016 04:51 AM, Jianxun Zhang wrote:
> 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']

LIVE images (such iso) and VM images (such as vmdk) can't use the same
settings, for these vars, for example they can't use the same INITRD,
otherwise either of them will fail to boot.

For LABELS, live images usually needs "boot install", but for VM images,
it only needs "boot".

I will send an email to Scott to update the document.

// Robert

>     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