[poky] [PATCH 4/8] sanity.bbclass: warn the user if BBPATH contains wrong entries

Martin Jansa martin.jansa at gmail.com
Thu Jun 21 14:14:16 PDT 2012


On Fri, Jun 22, 2012 at 12:00:09AM +0300, Andrei Gherzan wrote:
> In a qemumips build with master poky:
> 
> WARNING: BBPATH references the current directory, either through an empty
> entry, or a '.'.
>  This is unsafe and means your layer configuration is adding empty elements
> to BBPATH.
>  Please check your layer.conf files and other BBPATH settings to remove the
> current working directory references.
> 
> And this is because BBPATH contains:
> /home/agherzan/work/personal/yocto/poky-contrib/meta-yocto::/home/agherzan/work/personal/yocto/poky-contrib/meta
> 
> Well it's strange that:
> meta: BBPATH .= ":${LAYERDIR}"
> meta-yocto: BBPATH := "${LAYERDIR}:${BBPATH}"
> 
> This explains the way BBPATH above ended
> like: /home/agherzan/work/personal/yocto/poky-contrib/meta-yocto::/home/agherzan/work/personal/yocto/poky-contrib/meta
> 
> Why don't we assign BBPATH as this in meta:
> BBPATH .= "${LAYERDIR}"
> 
> And then in all other layers use: meta-yocto: BBPATH :=
> "${LAYERDIR}:${BBPATH}". In this way the variable would be correctly
> generated.

IMHO it's better to change meta-yocto/conf/layer to 
BBPATH .= ":${LAYERDIR}"
so the BBPATH order is the same as order of layers in bblayers.conf

I've changed it lately in 
meta-initramfs http://patchwork.openembedded.org/patch/28487/
meta-handheld  http://patchwork.openembedded.org/patch/28485/

so it would be more consistent to change it in meta-yocto too.

Cheers,

> On Thu, Jun 21, 2012 at 11:32 PM, Andrei Gherzan <andrei at gherzan.ro> wrote:
> 
> > On Thu, Jun 21, 2012 at 6:51 PM, Khem Raj <raj.khem at gmail.com> wrote:
> >
> >> On Mon, Jun 18, 2012 at 12:56 PM, Scott Garman <scott.a.garman at intel.com>
> >> wrote:
> >> > From: Laurentiu Palcu <laurentiu.palcu at intel.com>
> >> >
> >> > If BBPATH references the working directory, the user is warned and asked
> >> > to fix the problem.
> >> >
> >> > [Yocto #1465]
> >> >
> >> > (From OE-Core rev: 73f10ae955ba217078fa2c5288b736ae8a30b184)
> >> >
> >> > Signed-off-by: Laurentiu Palcu <laurentiu.palcu at intel.com>
> >> > Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> >> >
> >> > Reworked commit to fix merge conflicts with denzil branch.
> >> >
> >> > Signed-off-by: Scott Garman <scott.a.garman at intel.com>
> >> > ---
> >> >  meta/classes/sanity.bbclass |   13 ++++++++++++-
> >> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> >> > index 9755694..298372b 100644
> >> > --- a/meta/classes/sanity.bbclass
> >> > +++ b/meta/classes/sanity.bbclass
> >> > @@ -310,7 +310,18 @@ def check_sanity(sanity_data):
> >> >     if "." in data.getVar('PATH', sanity_data, True).split(":"):
> >> >         messages = messages + "PATH contains '.' which will break the
> >> build, please remove this"
> >> >
> >> > -    if data.getVar('TARGET_ARCH', sanity_data, True) == "arm":
> >> > +    bbpaths = sanity_data.getVar('BBPATH', True).split(":")
> >> > +    if "." in bbpaths or "" in bbpaths:
> >> > +        # TODO: change the following message to fatal when all BBPATH
> >> issues
> >> > +        # are fixed
> >> > +        bb.warn("BBPATH references the current directory, either
> >> through "    \
> >> > +                "an empty entry, or a '.'.\n\t This is unsafe and
> >> means your "\
> >> > +                "layer configuration is adding empty elements to
> >> BBPATH.\n\t "\
> >> > +                "Please check your layer.conf files and other BBPATH "
> >>        \
> >> > +                "settings to remove the current working directory "
> >>         \
> >> > +                "references.");
> >> > +
> >> > +    if sanity_data.getVar('TARGET_ARCH', True) == "arm":
> >>
> >> No I get this warning when I use OE-Core standalone. The reason is for
> >> OE-Core
> >>
> >> BBPATH .= ":${LAYERDIR}"
> >>
> >> and there are no more entries prepended since its the only layer so
> >> leading : is causing
> >> this warning to show up.
> >>
> >>
> > I confirm this.
> >
> > @g
> >
> >

> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20120621/55b20a36/attachment.pgp>


More information about the poky mailing list