<?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>15638</bug_id>
          
          <creation_ts>2024-10-29 14:55:08 +0000</creation_ts>
          <short_desc>bitbake-getvar doesn&apos;t have identical output to bitbake -e</short_desc>
          <delta_ts>2024-11-19 16:23:14 +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>5.1</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=15652</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 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Yoann Congal">yoann.congal</assigned_to>
          <cc>adrian.freihofer</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>yoann.congal</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>100057</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-29 14:55:08 +0000</bug_when>
    <thetext>$ bitbake-getvar DISTRO_FEATURES   --value
acl alsa bluetooth debuginfod ext2 ipv4 ipv6 pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp opengl ptest multiarch wayland vulkan sysvinit

$ bitbake -e |grep DISTRO_FEATURES=
DISTRO_FEATURES=&quot;acl alsa bluetooth debuginfod ext2 ipv4 ipv6 pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp opengl ptest multiarch wayland vulkan sysvinit pulseaudio gobject-introspection-data ldconfig&quot;

Notably, the backfill hasn&apos;t happened.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100058</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian">adrian.freihofer</who>
    <bug_when>2024-10-29 15:44:23 +0000</bug_when>
    <thetext>It&apos;s also interesting that bitbake-getvar behaves differently if called with -r or without (as in the example here). With -r it&apos;s more verbose than without.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100059</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-10-29 17:46:27 +0000</bug_when>
    <thetext>cooker.py in the -e codepath does:

            data.expandKeys(envdata)
            parse.ast.runAnonFuncs(envdata)

on the data. Adding the expandKeys is straightforward enough for bitbake-getvar but the runAnonFuncs will need a new API call adding for tinfoil to use.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100145</commentid>
    <comment_count>3</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-11-12 23:13:51 +0000</bug_when>
    <thetext>Patches sent:
https://lists.openembedded.org/g/bitbake-devel/message/16793
https://lists.openembedded.org/g/bitbake-devel/message/16794
https://lists.openembedded.org/g/openembedded-core/message/207069</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100176</commentid>
    <comment_count>4</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-11-14 18:28:18 +0000</bug_when>
    <thetext>(In reply to Yoann Congal from comment #3)
&gt; Patches sent:
&gt; https://lists.openembedded.org/g/bitbake-devel/message/16793
&gt; https://lists.openembedded.org/g/bitbake-devel/message/16794
&gt; https://lists.openembedded.org/g/openembedded-core/message/207069

Those patches make runqemu.QemuTest.test_qemu_can_boot_nfs_and_shutdown fail.
Reverting the getvar patch fix the issue. I can reproduce locally, I&apos;ll investigate.

Idea from #yp-infra:
[23:18:41] &lt;RP&gt; yocton: I think something in the testing code uses bitbake-getvar to get a value and your fix is breaking it!
[23:19:11] &lt;yocton&gt; Same idea. I&apos;ll try to locate this getvar call</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100177</commentid>
    <comment_count>5</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-11-14 18:29:45 +0000</bug_when>
    <thetext>Failure log with patch applied:
https://valkyrie.yoctoproject.org/#/builders/28/builds/402/steps/12/logs/stdio
https://valkyrie.yoctoproject.org/#/builders/28/builds/402/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100178</commentid>
    <comment_count>6</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-11-14 22:25:21 +0000</bug_when>
    <thetext>v2 sent

[PATCH v2 1/2] tinfoil: add new &quot;finalizeData&quot; API
https://lists.openembedded.org/g/bitbake-devel/message/16801
[PATCH v2 2/2] bitbake-getvar: use finalizeData tinfoil API to get identical result to &quot;bitbake -e&quot;
https://lists.openembedded.org/g/bitbake-devel/message/16802</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100211</commentid>
    <comment_count>7</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-11-19 15:41:17 +0000</bug_when>
    <thetext>Merged:

bitbake: tinfoil: add new &quot;finalizeData&quot; API - poky - Poky Build Tool and Metadata
https://git.yoctoproject.org/poky/commit/?id=30a3ac4a2e81cb13c3113e15b38444490450a70f
bitbake: bitbake-getvar: use finalizeData tinfoil API to get identical result to &quot;bitbake -e&quot; - poky - Poky Build Tool and Metadata
https://git.yoctoproject.org/poky/commit/?id=4be9d612252286b4f920adb729d28b28e2372dc4
oeqa/selftest: add a test for bitbake &quot;-e&quot; and &quot;-getvar&quot; difference - poky - Poky Build Tool and Metadata
https://git.yoctoproject.org/poky/commit/?id=131872001abf6c76bd1ed7e31cc68c88ede8ca2c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>