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

Martin Jansa martin.jansa at gmail.com
Thu Jun 21 22:39:05 PDT 2012


On Fri, Jun 22, 2012 at 12:24:05AM +0300, Andrei Gherzan wrote:
> On Fri, Jun 22, 2012 at 12:14 AM, Martin Jansa <martin.jansa at gmail.com>wrote:
> 
> > 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
> >
> > This wouldn't fix it. As BBPATH would still have an empty value: the first
> -> ":bla:bla"

Yes, this alone won't fix it for everybody, but will allow you to define
such order of BBPATH appends, so that if you start with non-empty value
then it will work fine.

For example my setup has TOPDIR as first item in BBPATH:

bblayers.conf:
BBPATH ?= "${TOPDIR}"

BBFILES ?= ""

# Add your overlay location to BBLAYERS
# Make sure to have a conf/layers.conf in there
BBLAYERS = " \
  ${TOPDIR}/meta-jama \
  ${TOPDIR}/meta-smartphone/meta-shr \
  ${TOPDIR}/meta-smartphone/meta-aurora \
  ${TOPDIR}/meta-smartphone/meta-fso \
  ${TOPDIR}/meta-openembedded/meta-oe \
  ${TOPDIR}/meta-openembedded/toolchain-layer \
  ${TOPDIR}/meta-openembedded/meta-efl \
  ${TOPDIR}/meta-openembedded/meta-gnome \
  ${TOPDIR}/meta-openembedded/meta-gpe \
  ${TOPDIR}/meta-openembedded/meta-initramfs \
  ${TOPDIR}/meta-openembedded/meta-systemd \
  ${TOPDIR}/meta-smartphone/meta-osmocombb \
  ${TOPDIR}/meta-smartphone/meta-nokia \
  ${TOPDIR}/meta-smartphone/meta-htc \
  ${TOPDIR}/meta-smartphone/meta-palm \
  ${TOPDIR}/meta-smartphone/meta-openmoko \
  ${TOPDIR}/meta-smartphone/meta-samsung \
  ${TOPDIR}/meta-handheld \
  ${TOPDIR}/meta-browser \
  ${TOPDIR}/openembedded-core/meta \
"

and resulting BBPATH respects that correctly
bitbake -e | grep ^BBPATH | sed 's/:/:^M/g'
BBPATH="/OE/shr-core:
/OE/shr-core/meta-jama:
/OE/shr-core/meta-smartphone/meta-shr:
/OE/shr-core/meta-smartphone/meta-aurora:
/OE/shr-core/meta-smartphone/meta-fso:
/OE/shr-core/meta-openembedded/meta-oe:
/OE/shr-core/meta-openembedded/toolchain-layer:
/OE/shr-core/meta-openembedded/meta-efl:
/OE/shr-core/meta-openembedded/meta-gnome:
/OE/shr-core/meta-openembedded/meta-gpe:
/OE/shr-core/meta-openembedded/meta-initramfs:
/OE/shr-core/meta-openembedded/meta-systemd:
/OE/shr-core/meta-smartphone/meta-osmocombb:
/OE/shr-core/meta-smartphone/meta-nokia:
/OE/shr-core/meta-smartphone/meta-htc:
/OE/shr-core/meta-smartphone/meta-palm:
/OE/shr-core/meta-smartphone/meta-openmoko:
/OE/shr-core/meta-smartphone/meta-samsung:
/OE/shr-core/meta-handheld:
/OE/shr-core/meta-browser:
/OE/shr-core/openembedded-core/meta"

see https://bugzilla.yoctoproject.org/show_bug.cgi?id=1465 for few more
details and reason why this BBPATH check started.

Cheers,

-- 
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/20120622/e212015b/attachment.pgp>


More information about the poky mailing list