<?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>5507</bug_id>
          
          <creation_ts>2013-11-07 19:50:26 +0000</creation_ts>
          <short_desc>Inconsistent bitbake variable handling</short_desc>
          <delta_ts>2014-03-20 11:04:05 +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>1.5</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>20 March 2014: Doc flag reset</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hatle">mark.hatle</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>kergoth</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</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>38671</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2013-11-07 19:50:26 +0000</bug_when>
    <thetext>I had a user who was trying to clear a value and noticed something (each of these examples when set in local.conf exhibited the explained behavior.)


VAL = &quot;&quot;

The variable VAL is &apos;defined&apos;, but is set to None.


VAL = &quot; &quot;
The variable VAL is &apos;defined&apos;, and is set to the string &quot;&quot;.


VAL = &quot; something&quot;
The variable VAL is &apos;defined&apos;, and is set to the string &quot;something&quot;.


Chris Larsen pointed me at:

https://github.com/openembedded/bitbake/blob/master/lib/bb/data.py#L217-L218
and
https://github.com/openembedded/bitbake/blob/master/lib/bb/data.py#L232

Which explains why &quot;&quot; and &quot; &quot; differ in behavior, and why leading white space is being stripped.

Should &quot;&quot; and &quot; &quot; return the same (None) value, or is this correct behavior.  If it is, this should likely be documented in the bitbake manual somewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39067</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-11-25 14:55:31 +0000</bug_when>
    <thetext>Fixed in master with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b1c15cb9077f1d2e19376ff8506359ebbb77d6e3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41511</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2014-03-20 11:04:05 +0000</bug_when>
    <thetext>Hi, 

I updated the http://www.yoctoproject.org/docs/1.6/user-manual/user-manual.html#basic-variable-setting section to include information about retention of leading and trailing blanks, setting a variable to an empty string, and setting a variable to whitespace.

Richard reviewed the changes and approved. 

Setting the Doc flag to &quot;Done&quot;.

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>