Bug 13148

Summary: bitbake-layers show-layers shows incorrect information
Product: [Build System, Metadata & Runtime] BitBake Reporter: Alexei.Fedorov
Component: bitbakeAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 2.7 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alexei.Fedorov 2019-01-24 10:55:34 UTC
With the following layers defined in bblayers.conf:

BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
  ${TOPDIR}/../poky/meta \
  ${TOPDIR}/../poky/meta-poky \
  ${TOPDIR}/../poky/meta-yocto-bsp \
  ${TOPDIR}/../meta-openembedded/meta-oe \
  ${TOPDIR}/../openembedded-core/meta \
  " 

Executing "bitbake-layers show-layers" reports /poky/meta twice:

NOTE: Starting bitbake server...
layer                 path                                      priority
==========================================================================
meta                  ../build/../poky/meta  5
meta-poky             ../build/../poky/meta-poky  5
meta-yocto-bsp        ../build/../poky/meta-yocto-bsp  5
meta-oe               ../build/../meta-openembedded/meta-oe  6
meta                  ../build/../poky/meta  5

Then if ${TOPDIR}/../openembedded-core/meta is placed before ${TOPDIR}/../poky/meta, i.e.:

  ${TOPDIR}/../openembedded-core/meta \
  ${TOPDIR}/../poky/meta \
  ${TOPDIR}/../poky/meta-poky \
  ${TOPDIR}/../poky/meta-yocto-bsp \

openembedded-core/meta is displayed twice with poky/meta got missing:

layer                 path                                      priority
==========================================================================
meta                  ../build/../openembedded-core/meta  5
meta                  ../build/../openembedded-core/meta  5
meta-poky             ../build/../poky/meta-poky  5
meta-yocto-bsp        ../build/../poky/meta-yocto-bsp  5
meta-oe               ../build/../meta-openembedded/meta-oe  6
Comment 1 Richard Purdie 2019-01-24 15:42:09 UTC
We should give a fatal error if two layers are being defined with the same namespace as that is not intended to work.