<?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>15746</bug_id>
          
          <creation_ts>2025-02-16 10:08:34 +0000</creation_ts>
          <short_desc>BB_CMDLINE undocumented</short_desc>
          <delta_ts>2025-12-27 08:03:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>BitBake User Manual</product>
          <component>bitbake-manual</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>NEWCOMER</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>kweihmann</reporter>
          <assigned_to name="Swaminathan K">swami310</assigned_to>
          <cc>antonin.godard</cc>
    
    <cc>dixitparmar19</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>swami310</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101085</commentid>
    <comment_count>0</comment_count>
    <who name="">kweihmann</who>
    <bug_when>2025-02-16 10:08:34 +0000</bug_when>
    <thetext>BB_CMDLINE set by bitbake and used by buildhistory is lacking a documentation</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102376</commentid>
    <comment_count>1</comment_count>
    <who name="Dixit Parmar">dixitparmar19</who>
    <bug_when>2025-07-02 12:53:17 +0000</bug_when>
    <thetext>At first glance, BB_CMDLINE variable is set by cooker.py based on the bitbake instance run as a command line, and that variable is largely used by buildhistory purposes. However, I did not find any instances or use cases to manually specify BB_CMDLINE, with that understanding - Do we document this internally used variable? If yes, Is ref-manual variables is right place?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102377</commentid>
    <comment_count>2</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2025-07-02 13:38:11 +0000</bug_when>
    <thetext>(In reply to Dixit Parmar from comment #1)
&gt; At first glance, BB_CMDLINE variable is set by cooker.py based on the
&gt; bitbake instance run as a command line, and that variable is largely used by
&gt; buildhistory purposes. However, I did not find any instances or use cases to
&gt; manually specify BB_CMDLINE, with that understanding - Do we document this
&gt; internally used variable? If yes, Is ref-manual variables is right place?

Hi,

Indeed, OE-Core is only a consumer of this variable from what I can see. This variable belongs to the document of Bitbake, which is separate from OE-Core.

This documentation is part of the Bitbake repo, and the variables are documented here:
https://git.openembedded.org/bitbake/tree/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst

Also: BitBake documentation should _not_ make references to OE-Core, so you can try documenting it with only the scope of the BitBake source code in mind.

Additionally, you can document it in yocto-docs as follows:

   :term:`BB_CMDLINE`
      See :term:`bitbake:BB_CMDLINE` in the BitBake manual.

Thanks!
Antonin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102465</commentid>
    <comment_count>3</comment_count>
    <who name="Dixit Parmar">dixitparmar19</who>
    <bug_when>2025-07-16 03:25:56 +0000</bug_when>
    <thetext>Thanks Antonin.
As we understand BB_CMDLINE is under-the-hood variable, used by bitbake internally and its not possible to explicitly define it, it just contain what have provided as bitbake command. With understanding, I feel we should not have such variables documented and exposed to user to avoid confusion. What you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102494</commentid>
    <comment_count>4</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2025-07-22 11:50:34 +0000</bug_when>
    <thetext>(In reply to Dixit Parmar from comment #3)
&gt; Thanks Antonin.
&gt; As we understand BB_CMDLINE is under-the-hood variable, used by bitbake
&gt; internally and its not possible to explicitly define it, it just contain
&gt; what have provided as bitbake command. With understanding, I feel we should
&gt; not have such variables documented and exposed to user to avoid confusion.
&gt; What you think?

I think it&apos;s ok to document this variable but it needs to clearly mention that is is read-only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103437</commentid>
    <comment_count>5</comment_count>
    <who name="Swaminathan K">swami310</who>
    <bug_when>2025-12-01 00:41:51 +0000</bug_when>
    <thetext>
A  package  can be built in multiple ways:

As a Dependency (Indirectly Requested)
Explicitly requested ( directly)

A developer looking at the history needs to know if a build failure  was caused by:

A global change: Did someone change a setting in local.conf that affected all builds (which BB_CMDLINE would show by reflecting the standard image build command)?
A targeted rebuild: Did someone run a specific, potentially experimental, command just for that one package?

The BB_CMDLINE variable provides this specific audit trail within the build history logs.

BB_CMDLINE is an internal variable and is read-only. It captures the exact command line used for the current invocation of bitbake .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103439</commentid>
    <comment_count>6</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2025-12-01 09:45:22 +0000</bug_when>
    <thetext>Hi Swaminathan K, thanks for the reply and help.

(In reply to Swaminathan K from comment #5)
&gt; A  package  can be built in multiple ways:
&gt; 
&gt; As a Dependency (Indirectly Requested)
&gt; Explicitly requested ( directly)
&gt; 
&gt; A developer looking at the history needs to know if a build failure  was
&gt; caused by:
&gt; 
&gt; A global change: Did someone change a setting in local.conf that affected
&gt; all builds (which BB_CMDLINE would show by reflecting the standard image
&gt; build command)?
&gt; A targeted rebuild: Did someone run a specific, potentially experimental,
&gt; command just for that one package?

I think the above is a bit too verbose for this variable, it can be kept short and simple by leaving only what&apos;s below.

&gt; The BB_CMDLINE variable provides this specific audit trail within the build
&gt; history logs.

Which log file are you talking about?
 
&gt; BB_CMDLINE is an internal variable and is read-only. It captures the exact
&gt; command line used for the current invocation of bitbake .

This is fine to me and IMO this could be shortened to this sentence only. 

To move forward, you need to send a patch to the bitbake-devel mailing: bitbake-devel@lists.openembedded.org.
You would need to modify this file: https://git.openembedded.org/bitbake/tree/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
Please read the contributor guide to learn how to send patches via email: https://docs.yoctoproject.org/contributor-guide/submit-changes.html 

Keep in mind that we need to document this in BitBake&apos;s variable glossary. Those are definitions more that tutorial / guides.

Thanks!
Antonin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103446</commentid>
    <comment_count>7</comment_count>
    <who name="Swaminathan K">swami310</who>
    <bug_when>2025-12-02 05:35:24 +0000</bug_when>
    <thetext>thanks Antonin ! I will keep it short like this :

BB_CMDLINE is an internal variable and is read-only. It captures the exact
command line used for the current invocation of bitbake 


---
I am a novice and I would need some help with the steps to update the document. I am not sure if this is the place to ask for. Kindly point me to the right place where I can update</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103447</commentid>
    <comment_count>8</comment_count>
    <who name="Swaminathan K">swami310</who>
    <bug_when>2025-12-02 05:49:18 +0000</bug_when>
    <thetext>To clarify, I have read through the contributor guide but still not clear how to make the changes :(. Kindly bear with me and point to any step by step instruction for a novice like me.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>