<?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>16497</bug_id>
          
          <creation_ts>2026-11-14 04:32:44 +0000</creation_ts>
          <short_desc>layerindex: distro configuration leaks into the parsing of a layer&apos;s recipes</short_desc>
          <delta_ts>2026-11-14 07:22:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Layer Index</product>
          <component>Layer Index</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>IN PROGRESS REVIEW</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.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Orling">tim.orling</reporter>
          <assigned_to name="Tim Orling">tim.orling</assigned_to>
          
          
          <qa_contact name="apoorv sangal">apoorvsangal</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>107427</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-11-14 04:32:44 +0000</bug_when>
    <thetext>To index a layer&apos;s distros, update_layer.py parses each distro configuration file (conf/distro/*.conf) with update_distro_conf_file(), but it parses it into the same datastore it then uses to parse the layer&apos;s recipes. Every recipe parsed after a distro configuration in the same run therefore gets that distro&apos;s configuration, so its indexed data can be wrong, and parsing can fail.

Example: meta-luneos on scarthgap. After conf/distro/luneos.conf has been parsed, image recipes such as luneos-emulator-appliance.bb fail with:

  bb.data_smart.ExpansionError: Failure expanding variable WEBOS_DISTRO_TOPDIR_BRANCH, expression was ${@oebackport.buildcfg.get_metadata_git_branch(...)}
  NameError: name &apos;oebackport&apos; is not defined

WEBOS_DISTRO_TOPDIR_BRANCH comes from luneos.inc, which only luneos.conf includes, so these recipes should never see it when indexed. (The NameError itself is bug 16192.) Whether a recipe is affected depends on the order the files are processed in.

Fix: parse each distro configuration file into a copy of the datastore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107441</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-11-14 06:48:35 +0000</bug_when>
    <thetext>Patch sent for review, staged on master-next:

update_layer: don&apos;t parse distro configuration into the recipe datastore
https://lore.kernel.org/yocto-patches/20261114044035.88470-2-tim.orling@konsulko.com/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>