<?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>9683</bug_id>
          
          <creation_ts>2016-05-28 10:06:56 +0000</creation_ts>
          <short_desc>3.10  says d.getVar(&quot;X&quot;, expand=False) but that&apos;s wrong for 2.1</short_desc>
          <delta_ts>2016-06-09 17:30:19 +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>2.1</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>9 June 2016: IN PROGRESS REVIEW</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Harald Achitz">harald.achitz</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>62509</commentid>
    <comment_count>0</comment_count>
    <who name="Harald Achitz">harald.achitz</who>
    <bug_when>2016-05-28 10:06:56 +0000</bug_when>
    <thetext>d.getVar(&quot;X&quot;, expand=False) is not correct anymore, 
the default value has been removed and running bitbake will resutl in an error.

the current latest online docuementation
http://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.html#accessing-datastore-variables-using-python
does not mention this, even if it should since the bitbake version shipped with 
YP Core - Krogoth 2.1 does not have the default anymore.

this caused some confusion for me when I was looking for the reason why the samples to my bitbake tutorial (http://a4z.bitbucket.org/docs/BitBake/guide.html) stopped working</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62514</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-05-29 20:40:56 +0000</bug_when>
    <thetext>Right, this needs to be corrected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62745</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-06-08 01:41:19 +0000</bug_when>
    <thetext>Hi, 

Tell me what I need for that line for it to be correct.  

Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62748</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-06-08 02:14:54 +0000</bug_when>
    <thetext>There is no default for the expand parameter anymore, so replace &apos;expand=True&apos; with &apos;expand&apos;. We&apos;ll want to do the same for getVarFlag() as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62839</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-06-09 16:15:47 +0000</bug_when>
    <thetext>Hi, 

I took out the &quot;=True&quot; part for both of these in the table.  There still is an &quot;expand=False&quot; piece for them.  Does that matter?  Can you look this change over?

http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#accessing-datastore-variables-using-python

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62845</commentid>
    <comment_count>5</comment_count>
    <who name="Harald Achitz">harald.achitz</who>
    <bug_when>2016-06-09 16:42:02 +0000</bug_when>
    <thetext>the operation column need to be changed, 
I can see no change in the link you posted

d.getVar(&quot;X&quot;, expand=False) 
should be
d.getVar(&quot;X&quot;, expand)

it seems that this 
d.getVarFlag(&quot;X&quot;, flag, expand=False)
needs the same change ans should become
d.getVarFlag(&quot;X&quot;, flag, expand)


btw, the whole story motivated me to write a blog where I refer to documents that talk about changing user interfaces and flags in functions, 
possible interesting for Paul (should be)
http://a4z.bitbucket.org/blog/2016/05/28/A-broken-interface-or-why-ZMQ-C4-is-worth-reading.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62851</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-06-09 16:58:28 +0000</bug_when>
    <thetext>I was basing my changes on Comment 3, which seemed to not really address any defaults.  Thanks for clearing that up.  If you look at the two areas I changed, I did change &quot;exand=True&quot; to &quot;expand&quot; in each of the latter parts of those pieces - see d.getVar and d.getVarFlag in http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#accessing-datastore-variables-using-python.  You will see the last part of the description for each of those now says &quot; Using &quot;expand&quot; expands the value.&quot; and &quot;Using &quot;expand&quot; expands the named flag.&quot;, respectively.  They used to say &quot;.... expand=True ...&quot; in both cases. 

So you are saying I need to restore those particular pieces and remove the &quot;expand=False&quot; part for them both?

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62855</commentid>
    <comment_count>7</comment_count>
    <who name="Harald Achitz">harald.achitz</who>
    <bug_when>2016-06-09 17:08:03 +0000</bug_when>
    <thetext>yes, it should be

Operation: 
d.getVar(&quot;X&quot;, expand)	

Description: 
Returns the value of variable &quot;X&quot;. Using &quot;expand=True&quot; expands the value.


comment 3 talked already about some future state of the function where the function default value might be true, seems that is the plan, and was therefore not correct.

imho just an other sing that my blog post about flags in functions targets some truths :-) 
(just kidding, but I mean it serious)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62861</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-06-09 17:18:58 +0000</bug_when>
    <thetext>How does this look? http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#accessing-datastore-variables-using-python

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62864</commentid>
    <comment_count>9</comment_count>
    <who name="Harald Achitz">harald.achitz</who>
    <bug_when>2016-06-09 17:22:55 +0000</bug_when>
    <thetext>looks good for me.
this would have told me immediately that there is no default any more, so  I thinks it&apos;s fine.

Thanks for you effort Scott!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62866</commentid>
    <comment_count>10</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-06-09 17:30:19 +0000</bug_when>
    <thetext>No problem Harald... thanks for taking the time to note it here. 

Best, 
Scott

Setting to RESOLVED and moving the doc flag to done.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>