<?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>15587</bug_id>
          
          <creation_ts>2024-09-04 09:27:55 +0000</creation_ts>
          <short_desc>Processing of LAYERDIR during layer parsing causes loss of data</short_desc>
          <delta_ts>2026-09-10 15:13:03 +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>2.0.3</version>
          <rep_platform>All</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Blank">adam.blank.g</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>adam.blank.g</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>yoann.congal</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>99607</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Blank">adam.blank.g</who>
    <bug_when>2024-09-04 09:27:55 +0000</bug_when>
    <thetext>Current implementation of expandVarref has the following undesired characteristics:

- ref = &apos;${%s}&apos; % variable
  This line discriminates this type of variable reference ${@d.getVar(&apos;LAYERDIR&apos;)}&quot;
  which causes them to always resolve to None

- referrervalue = self.getVar(key, False)
  if referrervalue and isinstance(referrervalue, str) and ref in referrervalue:
      self.setVar(key, referrervalue.replace(ref, value))
  This block (the serVar() call in particular) has the effect,
  that variables which reference LAYERDIR lose their append/prepend/remove data.
  During the call to expandVarref(&apos;LAYERDIR&apos;), whichever append/prepend/remove
  apply at the moment are used by getVar(), and then they are all dropped by serVar(),
  including the ones whose OVERRIDES would come from layers parsed later</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99611</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-09-05 14:36:34 +0000</bug_when>
    <thetext>See discussion on mailing list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99612</commentid>
    <comment_count>2</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-09-05 14:38:28 +0000</bug_when>
    <thetext>https://lists.openembedded.org/g/bitbake-devel/topic/108158309</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106794</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2026-09-10 15:13:03 +0000</bug_when>
    <thetext>We are thinking of changing the way layers get added and we could try and take this into account when we do that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>