<?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>7511</bug_id>
          
          <creation_ts>2015-03-24 18:50:18 +0000</creation_ts>
          <short_desc>bbappend application order between % and non-% is not correct or deterministic</short_desc>
          <delta_ts>2015-04-30 10:48:55 +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>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>TC needed</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christopher Larson">kergoth</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          <qa_contact name="Costin">costin.c.constantin</qa_contact>
          <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>49713</commentid>
    <comment_count>0</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2015-03-24 18:50:18 +0000</bug_when>
    <thetext>Appends end up shoved into a dictionary (self.appendlist in the cooker) by base name, which is the append name with &apos;bbappend&apos; replaced with &apos;bb&apos;. This means that systemd_% and systemd_219 end up as two different entries in this dict. So within a given basename, layer priority order is retained, but between the two, the order is non-deterministic, and of course the order between the two sets of appends is lost, since they&apos;re processed first one, then the other.

I expect we should probably do the mapping of % to actual recipe up front rather than postponed to get_file_append(), which would avoid the need to index the appends the way we are now.

This bug leads to sstate reuse problems, as the changing append order can change the order of entries in word-separated / list-style variables (e.g. SRC_URI).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50008</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-03-31 21:44:19 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=3cb87724a5b21550e99c18e97b665d6604bb2fa9</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50631</commentid>
    <comment_count>2</comment_count>
    <who name="Costin">costin.c.constantin</who>
    <bug_when>2015-04-30 10:48:55 +0000</bug_when>
    <thetext>Hello,

I tested this bug by having a foo_0.1.1.bb in a layer and two .bbappend files each on their own layer:

cosscat@ubnt:/media/poky/3poky$ ls meta-layer?/recipe*/
meta-layer1/recipes-test/:
foo_0.1.1.bb

meta-layer2/recipes-test/:
foo_0.1.1.bbappend #this one contains A += &quot;1&quot;

meta-layer3/recipes-test/:
foo_%.bbappend # this one contains A += &quot;2&quot;

Ran 100 times bitbake foo -e | grep &apos;A=&quot; 1 2&quot;&apos; and all in all cases, the result is the same:

cosscat@ubnt:/media/poky/3poky/build$ for i in $(seq 100)
&gt; do 
&gt; bitbake foo -e | grep &apos;A=&quot; 1 2&quot;&apos;
&gt; done

A=&quot; 1 2&quot; # 100 times   
...

Marking bug as verified.

Costin</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>