All of lore.kernel.org
 help / color / mirror / Atom feed
* Question for OE variable "LABELS"
@ 2016-10-19 20:51 Jianxun Zhang
  2016-10-20  7:11 ` Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Jianxun Zhang @ 2016-10-19 20:51 UTC (permalink / raw)
  To: OE-core

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question for OE variable "LABELS"
  2016-10-19 20:51 Question for OE variable "LABELS" Jianxun Zhang
@ 2016-10-20  7:11 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2016-10-20  7:11 UTC (permalink / raw)
  To: Jianxun Zhang, OE-core


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
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-20  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 20:51 Question for OE variable "LABELS" Jianxun Zhang
2016-10-20  7:11 ` Robert Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.