<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6551</bug_id>
          
          <creation_ts>2014-07-18 09:10:09 +0000</creation_ts>
          <short_desc>layer priorities shadowing</short_desc>
          <delta_ts>2014-10-03 22:38:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>1.7</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stefan Mueller-Klieser">s.mueller-klieser</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>dvhart</cc>
    
    <cc>nitin.a.kamble</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>44559</commentid>
    <comment_count>0</comment_count>
    <who name="Stefan Mueller-Klieser">s.mueller-klieser</who>
    <bug_when>2014-07-18 09:10:09 +0000</bug_when>
    <thetext>occurs on:
poky branch master
commit 1dcdd877c7946be
meta-intel branch master

I report an unexpected behavior with layers containing sub directory layers, seen in the meta-intel directory structure. If a sub layer has a higher BBFILE_PRIORITY set in the layer.conf than the top directory layer.conf, the priorities will be only applied if the sub layer is listed prior to the top layer in the bblayers.conf. If the sub layer is listed after the top layer, the priorities from the sub layer.conf will be ignored or shadowed. Is this intended behavior or a bug?
Regards, Stefan</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45829</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-09-25 12:53:04 +0000</bug_when>
    <thetext>Its probably working as designed but the configuration is unclear.

The top level layer.conf does:

BBFILE_PATTERN_intel := &quot;^${LAYERDIR}/&quot;
BBFILE_PRIORITY_intel = &quot;5&quot;

then crownbay for example does:

BBFILE_PATTERN_crownbay := &quot;^${LAYERDIR}/&quot;
BBFILE_PRIORITY_crownbay = &quot;6&quot;

so when bitbake has some recipe file, it tries to resolve which layer the file belongs to and it therefore calls each BBFILE_PATTERN in turn until one matches. Since the crownbay directory is within intel, it only works if crownbay is called first, then intel as a later match.

In turn, that only happens if the order in bblayers.conf is the correct way around.

So the fix is either to improve the BBFILE_PATTERN_intel := &quot;^${LAYERDIR}/&quot; to say BBFILE_PATTERN_intel := &quot;^${LAYERDIR}/common&quot; and/or to be specific about the bblayers.conf ordering (which does matter).

I&apos;m ccing a few meta-intel people to see if this is something they can fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45866</commentid>
    <comment_count>2</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2014-09-25 20:26:07 +0000</bug_when>
    <thetext>The &lt;&lt;BBFILE_PATTERN_intel := &quot;^${LAYERDIR}/common&quot;&gt;&gt;  solution look favorable to me, as it can remove the requirement of ordering of listing layers in the bblayers.conf file. I feel the ordering should not be needed, as layer priority is handling same requirement. But I need to verify it can really solve the issue. I will do it and respond it here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45872</commentid>
    <comment_count>3</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2014-09-26 00:17:16 +0000</bug_when>
    <thetext>The &lt;&lt;BBFILE_PATTERN_intel := &quot;^${LAYERDIR}/common&quot;&gt;&gt;  solution is working as expected. The oder of layers in the bblayers.conf does not affect order in which the layers are considered. The layer priority mechanism is working as expected. I could build couple of BSPs with this change toe BBFILE_PATTERN variable.
  Looks like the change can go in without any other side effects. 

RP,
  Are there any other aspects to this change I need to be aware of before pushing the change in the meta-intel layer?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45940</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-09-29 13:16:08 +0000</bug_when>
    <thetext>Nitin: No, I think that fix can be merged.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46011</commentid>
    <comment_count>5</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2014-10-01 20:43:35 +0000</bug_when>
    <thetext>patch on the meta-intel ML</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46095</commentid>
    <comment_count>6</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2014-10-03 22:38:27 +0000</bug_when>
    <thetext>commit 6702f5a00c414c68f6f6ceae46552bce571cf93f
Author: Nitin A Kamble &lt;nitin.a.kamble@intel.com&gt;
Date:   Fri Sep 26 17:04:57 2014 -0700

    layer.conf: Avoid conflicts with sub-layers
    
    The layer priority is getting ignored because the same set of files
    are visible in the meta-intel layer as well as any of its sub layers.
    
    The layer pattern for recipe files is changed from &quot;^${LAYERDIR}/&quot; to
    &quot;^${LAYERDIR}/common&quot; to stop unintentionally including the sub-layer
    recipe files in the meta-intel layer.
    
    Fixes Bug:
    [YOCTO #6552]
    
    Signed-off-by: Nitin A Kamble &lt;nitin.a.kamble@intel.com&gt;
    Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>