<?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>15652</bug_id>
          
          <creation_ts>2024-11-19 16:22:44 +0000</creation_ts>
          <short_desc>&quot;bitbake -e&quot; and bitbake-getvar display different variable history</short_desc>
          <delta_ts>2025-04-03 13:46:01 +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>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=15638</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yoann Congal">yoann.congal</reporter>
          <assigned_to name="Yoann Congal">yoann.congal</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</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>100214</commentid>
    <comment_count>0</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-11-19 16:22:44 +0000</bug_when>
    <thetext>The variable history part of the output of &quot;bitbake -e&quot; (without recipe) for DISTRO_FEATURES is different from &quot;bitbake-getvar DISTRO_FEATURES&quot;: Notably, getvar lacks the operation from utils.py:
--- bb_e	2024-11-19 16:55:50.418258203 +0100
+++ getvar	2024-11-19 16:56:09.450228084 +0100
@@ -1,5 +1,5 @@
 #
-# $DISTRO_FEATURES [10 operations]
+# $DISTRO_FEATURES [9 operations]
 #   :remove &lt;SNIP&gt;/poky/build-master/conf/local.conf:323
 #     &quot;ptest&quot;
 #   :append &lt;SNIP&gt;/poky/build-master/conf/local.conf:392
@@ -18,8 +18,6 @@
 #     [doc] &quot;The features enabled for the distribution.&quot;
 #   set? &lt;SNIP&gt;/poky/meta/conf/bitbake.conf:904
 #     &quot;&quot;
-#   append utils.py:132 [features_backfill]
-#     &quot; pulseaudio gobject-introspection-data ldconfig&quot;
 # pre-expansion value:
 #   &quot;${DISTRO_FEATURES_DEFAULT} ${POKY_DEFAULT_DISTRO_FEATURES} seccomp polkit pam sysvinit pulseaudio gobject-introspection-data ldconfig&quot;
 DISTRO_FEATURES=&quot;acl alsa bluetooth debuginfod ext2 ipv4 ipv6 pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp opengl  multiarch wayland vulkan seccomp polkit pam sysvinit pulseaudio gobject-introspection-data ldconfig&quot;

Richard saw this bug [0] while reviewing the fix of [1]:
&gt; If you read bitbake-cookerdaemon.log for &quot;bitbake-getvar -r bash&quot; you
&gt; will see disableDataTracking() call before finalizeData(). This means
&gt; the variable history for anything run at finalize time will be missing.
&gt; That may mean the history output for something like DISTRO_FEATURES
&gt; will differ between bitbake -e and bitbake-getvar when a recipe is
&gt; specified.
&gt; 
&gt; The reason for the difference is that the parse_recipe_file turns
&gt; history on and off which ends up disabling it. That would be a bug as
&gt; the tinfoil session already has tracking. This is a separate bug
&gt; though.

NB: From when Richard saw this bug, it moved to the &quot;no recipe is specified&quot; case and I can&apos;t see it anymore in bitbake-cookerdaemon.log but the difference in output is there.

[0]: https://lists.openembedded.org/g/bitbake-devel/message/16790
[1]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15638</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100238</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-11-21 15:39:54 +0000</bug_when>
    <thetext>Values are coming out write but it would be nice if the history was the same as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101372</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-03-13 15:03:38 +0000</bug_when>
    <thetext>Values are coming out *right* but it would be nice if the history was the same as well. ;-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101373</commentid>
    <comment_count>3</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-13 15:10:17 +0000</bug_when>
    <thetext>From RP during bug triage call:
* enable/disable tracking in finalizeData (like parse_recipe_file)
* implement as a Python context manager</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101526</commentid>
    <comment_count>4</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-27 22:23:19 +0000</bug_when>
    <thetext>Fixed by this commit:
tinfoil: Track data during finalizeData - bitbake - Bitbake Development tree
https://git.openembedded.org/bitbake/commit/?id=228979b506f7d0e24c643440bcc7becf684da283</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>