<?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>13822</bug_id>
          
          <creation_ts>2020-03-02 23:10:35 +0000</creation_ts>
          <short_desc>Easy to have misleading warnings if env script is executed instead of sourced</short_desc>
          <delta_ts>2021-01-29 15:41:44 +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>OE-Core</product>
          <component>core</component>
          <version>3.0</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>NEWCOMMER</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.3 M2</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="New Comer Bugs">newcomer</assigned_to>
          <cc>akuster</cc>
    
    <cc>ankur.tyagi85</cc>
    
    <cc>dorindabassey</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>86646</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-03-02 23:10:35 +0000</bug_when>
    <thetext>If I user executes the environment script instead of sourcing it, they see errors about a &quot;&quot; element in PATH. This is because bitbake isn&apos;t present in PATH which breaks the PATH change in layer.conf.

We should add a sanity check for bitbake being present in PATH and error if not about the environment not being correct (did they source the script?).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88443</commentid>
    <comment_count>1</comment_count>
    <who name="Dorinda">dorindabassey</who>
    <bug_when>2020-10-21 00:19:00 +0000</bug_when>
    <thetext>hi,
I want to work on this bug, but i need a little bit of clarity from your description, this means i should add a sanity check in the environment script for if bitbake is present in the path, and if they sourced the script?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88631</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-11-19 16:11:34 +0000</bug_when>
    <thetext>The intent here was to check PATH in sanity.bbclass alongside other checks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88840</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-12-31 14:44:37 +0000</bug_when>
    <thetext>To give more of a hint, where we check this in sanity.bbclass:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/classes/sanity.bbclass#n786

we could also add a call along the lines of &quot;bb.utils.which(d.getVar(&apos;PATH&apos;), &apos;bitbake&apos;)&quot; which would determine if bitbake can be found in PATH. If not, we should error with a more specific error to the user.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89074</commentid>
    <comment_count>4</comment_count>
    <who name="Dorinda">dorindabassey</who>
    <bug_when>2021-01-29 01:53:15 +0000</bug_when>
    <thetext>patch submitted to oe-core mailing list @ https://lists.openembedded.org/g/openembedded-core/message/147239?p=,,,20,0,0,0::Created,,sanity.bbclass%3A,20,2,0,80121254</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89083</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-01-29 15:11:21 +0000</bug_when>
    <thetext>Can you confirm that it&apos;s in oe-core/master and provide a link? Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89084</commentid>
    <comment_count>6</comment_count>
    <who name="Dorinda">dorindabassey</who>
    <bug_when>2021-01-29 15:28:10 +0000</bug_when>
    <thetext>Alright, here is it https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=dbd80a923c9075d363f69ffd86b4392c210d668d
Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89086</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-01-29 15:41:44 +0000</bug_when>
    <thetext>Thanks for the link Dorinda!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>