<?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>12016</bug_id>
          
          <creation_ts>2017-08-31 06:01:28 +0000</creation_ts>
          <short_desc>Values for path variables in bitbake hello world tutorial make it harder to build upon it</short_desc>
          <delta_ts>2017-12-22 19:40:33 +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>22 DECEMBER 2017: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Kristi">kristi</assigned_to>
          <cc>caio.oliveira</cc>
    
    <cc>kristi</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>76380</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-08-31 06:01:28 +0000</bug_when>
    <thetext>I just debugged a user&apos;s strange issue with tasks not executing in a very basic bare bitbake setup, and we realised that the &quot;BitBake hello world&quot; tutorial in the bitbake manual sets values for WORKDIR and STAMP that do not allow for more than one recipe to build, and that was the cause of the issue.

It tells you to set this in conf/bitbake.conf:

     TMPDIR  = &quot;${TOPDIR}/tmp&quot;
     CACHE   = &quot;${TMPDIR}/cache&quot;
     STAMP   = &quot;${TMPDIR}/stamps&quot;
     T       = &quot;${TMPDIR}/work&quot;
     B       = &quot;${TMPDIR}&quot;

TMPDIR and CACHE are fine, but B, T and STAMP will prevent more than one recipe from working. Now, in order to fix this one has to have a value for at least PN, and since there isn&apos;t a default that means you have to either set it in the recipe or set a value similar to what OE or bitbake&apos;s default bitbake.conf does in order to pick it up from the file name; then you need to include ${PN} in the value set for STAMP, T, and B. I appreciate that complicates the example but it prevents users from stumbling over odd behaviour when they attempt to build on the example by adding additional recipes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76810</commentid>
    <comment_count>1</comment_count>
    <who name="Kristi">kristi</who>
    <bug_when>2017-09-13 23:38:40 +0000</bug_when>
    <thetext>Taking ownership of this one - Paul, this is the proposed solution to updating this example: 

From within the conf directory, use some editor to create the bitbake.conf so that it contains the following:

     PN  = &quot;${@bb.parse.BBHandler.vars_from_file(d.getVar(&apos;FILE&apos;, False),d)[0] or &apos;defaultpkgname&apos;}&quot;

     TMPDIR  = &quot;${TOPDIR}/tmp&quot;
     CACHE   = &quot;${TMPDIR}/cache&quot;
     STAMP   = &quot;${PN}/${TMPDIR}/stamps&quot;
     T       = &quot;${PN}/${TMPDIR}/work&quot;
     B       = &quot;${PN}/${TMPDIR}&quot;
             
NOTE: Without a value for PN, the variables STAMP, T, and B, prevent more than one recipe from working. You can fix this by setting PN to have a value similar to what OpenEmbedded and bitbake set in the default bitbake.conf file and prefacing STAMP, T, and B with PN.

Let me know if this fixes the problem, or if not, please update as necessary.  Thanks! 

Kristi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76812</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-09-13 23:49:18 +0000</bug_when>
    <thetext>Either set PN like that as OE does, yes, or each recipe has to manually set PN; either works.

Note that you have several references to &quot;${PN}/${TMPDIR}&quot; where I think you mean &quot;${TMPDIR}/${PN}&quot;. So it&apos;s &quot;including ${PN} in the value&quot; rather than prefacing it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76814</commentid>
    <comment_count>3</comment_count>
    <who name="Kristi">kristi</who>
    <bug_when>2017-09-13 23:58:11 +0000</bug_when>
    <thetext>Thanks Paul! I&apos;ve updated based on Comment 2 to the following: 

From within the conf directory, use some editor to create the bitbake.conf so that it contains the following:

     PN  = &quot;${@bb.parse.BBHandler.vars_from_file(d.getVar(&apos;FILE&apos;, False),d)[0] or &apos;defaultpkgname&apos;}&quot;

     TMPDIR  = &quot;${TOPDIR}/tmp&quot;
     CACHE   = &quot;${TMPDIR}/cache&quot;
     STAMP   = &quot;${TMPDIR}/${PN}/stamps&quot;
     T       = &quot;${TMPDIR}/${PN}/work&quot;
     B       = &quot;${TMPDIR}/${PN}&quot;

NOTE: Without a value for PN, the variables STAMP, T, and B, prevent more than one recipe from working. You can fix this by either setting PN to have a value similar to what OpenEmbedded and bitbake use in the default bitbake.conf file (see previous exmaple). Or, by manually updating each recipe to set PN. You will also need to include PN as part of the STAMP, T, and B variable definitions in the local.conf file.

Does this work?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76974</commentid>
    <comment_count>4</comment_count>
    <who name="Kristi">kristi</who>
    <bug_when>2017-09-19 23:33:33 +0000</bug_when>
    <thetext>I&apos;ve updated this section based on Paul&apos;s review in Comment 2. You can see the changes in step 5 here; http://www.yoctoproject.org/docs/2.4/bitbake-user-manual/bitbake-user-manual.html#hello-world-example

Please let me know if further edits are necessary, or if this is okay. 

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77132</commentid>
    <comment_count>5</comment_count>
    <who name="Kristi">kristi</who>
    <bug_when>2017-09-25 23:07:58 +0000</bug_when>
    <thetext>Moving to Milestone 2.5 M1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78762</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-12-19 20:52:22 +0000</bug_when>
    <thetext>Looks good to me. One minor thing though in this section - &quot; (other than the cached information used by the Setscene process&quot; is missing a closing parenthesis.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78817</commentid>
    <comment_count>7</comment_count>
    <who name="Kristi">kristi</who>
    <bug_when>2017-12-22 19:40:33 +0000</bug_when>
    <thetext>Thanks Paul. Setting to RESOLVED / Done.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>