<?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>12548</bug_id>
          
          <creation_ts>2018-02-13 18:15:37 +0000</creation_ts>
          <short_desc>Document variable assignment for DISTRO_FEATURES, IMAGE_FEATURES, SDKIMAGE_FEATURES, etc</short_desc>
          <delta_ts>2019-04-24 00:26:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>General Docs</product>
          <component>docs-general</component>
          <version>2.2</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>23 April 2019: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.7 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stephano Cetola">stephano</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79428</commentid>
    <comment_count>0</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2018-02-13 18:15:37 +0000</bug_when>
    <thetext>See Bug 12538 for more info.

Some variables are weakly assigned (??=), which is a strange concept for most people. It would be nice if we could have a blurb about how to properly append these kinds of variables.

I can make a list of these variables and write a blurb about this concept. Once that is complete we&apos;ll need to have a discussion about the best place to include this information.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81872</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2018-10-16 18:36:19 +0000</bug_when>
    <thetext>The BitBake User Manual has an explanation here - https://yoctoproject.org/docs/2.6/bitbake-user-manual/bitbake-user-manual.html#setting-a-weak-default-value.  We can reference this section for an explanation of that operator. 

If appending weakly assigned variables is weird or deserves special attention, we should describe it.  Possibly, it might be described in the BitBake manual.. I don&apos;t know.  Depends if it is something independent of YP or not.  

In any case, if you get a list of variables together we can see what do do. 

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82613</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2018-12-27 23:36:20 +0000</bug_when>
    <thetext>Hi, 

A bit of an update on this bug...  For YP 2.7 and forward, the BitBake User Manual will be part of the YP Mega-Manual.  Consequently, a discussion of &quot;weak&quot; assignments can be located in the mainstream YP documentation (https://yoctoproject.org/docs/2.7/mega-manual/mega-manual.html#setting-a-weak-default-value).

The question remaining for the bug is if we want to call out individual variables as being able to take this &quot;weak&quot; assignment.  I would wonder how many variables it involves?  We have a load of variables documented in both the YP Reference Manual and in the BitBake User Manual.  Do we want to note every applicable variable?  Probably not.  

Still looking for a list of variables.  Once we have that we can think about how to address this.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82682</commentid>
    <comment_count>3</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2019-01-04 17:29:10 +0000</bug_when>
    <thetext>Ross,

I am giving this NEEDINFO question to you, not sure you are the right owner.  Please assign to whoever can answer Scott&apos;s question.

Thanks,

Stephen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82976</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-02-09 18:53:45 +0000</bug_when>
    <thetext>Hi Scott,

The trouble is that variables and the way they default does change over time and I&apos;m not keen on maintaining a list in the manual, it would be a maintenance nightmare.

I agree we should cover the types of assignment, the implications of it and how a user could check a value really is as they thing it should be (&quot;bitbake &lt;recipe&gt; -e | grep VARIABLE=&quot; and also look at the variable history).

Perhaps this could go into a &quot;howto&quot; type section which could link to the assignment type sections and say something along the lines of:

&quot;&quot;&quot;
Users often need to modify existing variables to customise to their own needs. they may want to do this from a recipe to change a default from a bbclass, in a bbappend to change the original recipe, in a configuration file to override some other configuration or in many other cirumstances.

Changing the value can sometimes depend on how the value was originally assigned and also the desired intent of the change. In particular, appending to a variable with a default value sometimes doesn&apos;t work as you&apos;d initially expect since it can replace the value rather than add to it.

The best practise when something unexplained occurs is to check the value really does end up as you;d expect. You can do this with bitbake -e for configuration level changes and &quot;bitbake &lt;recipe&gt; -e | grep VARIABLE=&quot; for recipe level changes to check if they make it into a specific recipe
&quot;&quot;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82983</commentid>
    <comment_count>5</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2019-02-12 01:32:22 +0000</bug_when>
    <thetext>Richard, 

This suggestion is very helpful and I will implement it.  I did not want to have to have every variable saddled with some list of things about it (e.g. whether it can be &quot;weakly&quot; assigned. 

Thanks, 
Scott

I am also adding you to the CC list so you can give a review of the section when it is ready.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83579</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2019-04-18 17:32:59 +0000</bug_when>
    <thetext>Hi, 

Here is a new section I have added in the BitBake manual to address this specific use case - https://www.yoctoproject.org/docs/2.7/bitbake-user-manual/bitbake-user-manual.html#modifying-existing-variables.  Note that there are sprinklings of &quot;bitbake -e&quot; across the BB manual.  However, this new section targets the specific case where a reader would be asking themselves about modifying variable.

I will be putting some updates in the dev-manual as well and probably link to this section here in the BB manual. 

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83625</commentid>
    <comment_count>7</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2019-04-19 16:57:05 +0000</bug_when>
    <thetext>Hi, 

I have updated the &quot;Viewing Variable Values&quot; section in the dev-manual (https://yoctoproject.org/docs/2.7/dev-manual/dev-manual.html#dev-debugging-viewing-variable-values) by adding a new opening paragraph and tying it to the &quot;Modifying Existing Variables&quot; section, which is now in the BB manual. 

I think the two changes I have made are good for this issue:

dev-manual: https://yoctoproject.org/docs/2.7/dev-manual/dev-manual.html#dev-debugging-viewing-variable-values

bitbake-user-manual: https://www.yoctoproject.org/docs/2.7/bitbake-user-manual/bitbake-user-manual.html#modifying-existing-variables

Please review.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83632</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2019-04-24 00:26:55 +0000</bug_when>
    <thetext>Richard looked this section over in the commit and merged with BB repository.  The change for dev-manual was minor.  I am marking as RESOLVED and putting the doc flag to &quot;done.&quot;

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>