<?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>11775</bug_id>
          
          <creation_ts>2017-07-07 23:44:25 +0000</creation_ts>
          <short_desc>oe-init-build-env should check for dash and throw a meaningful error</short_desc>
          <delta_ts>2019-09-16 18:28:11 +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>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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.8 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stephano Cetola">stephano</reporter>
          <assigned_to name="Joshua Watt">JPEWhacker</assigned_to>
          <cc>brian.avery</cc>
    
    <cc>jacob.kroon</cc>
    
    <cc>JPEWhacker</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>74881</commentid>
    <comment_count>0</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-07-07 23:44:25 +0000</bug_when>
    <thetext>If you source oe-init-build-env using dash you can illicit some truly confusing errors. It would be best if we simply checked for the use of dash and threw an error to the effect of &quot;please use bash or compatible shell when sourcing oe-init-build-env&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74889</commentid>
    <comment_count>1</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-07-08 19:57:32 +0000</bug_when>
    <thetext>perhaps we could check to see if it acts like bash or dash.
e.g.
if [ &quot;$RANDOM&quot; != &quot;&quot; ]; then

 echo &quot;I am bash&quot;

else

 echo &quot; I am dash&quot;

fi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79588</commentid>
    <comment_count>2</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2018-02-24 18:54:00 +0000</bug_when>
    <thetext>This is a bug. It&apos;s also a simple change and should make M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81120</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2018-07-17 01:57:32 +0000</bug_when>
    <thetext>I just tried this with dash 0.5.9, and it appeared to work correctly (at least I was able to source the environment script and start a core-image-minimal build). Do you have an example of the errors that were being generated?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81169</commentid>
    <comment_count>4</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2018-07-23 20:39:08 +0000</bug_when>
    <thetext>Joshua,

Stephano has left the Yocto Team, so has Brian, so if this work for you why don&apos;t you close it as works for me.

Thanks,

Stephen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81715</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2018-10-03 15:41:41 +0000</bug_when>
    <thetext>This appears to work with dash 0.5.9. This can be reopened if it is determined that we need to work with an older version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82790</commentid>
    <comment_count>6</comment_count>
    <who name="Jacob Kroon">jacob.kroon</who>
    <bug_when>2019-01-14 21:43:28 +0000</bug_when>
    <thetext>On ubuntu 9 using dash, it does work when run from the same directory as the script lives in, but not otherwise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82791</commentid>
    <comment_count>7</comment_count>
    <who name="Jacob Kroon">jacob.kroon</who>
    <bug_when>2019-01-14 21:43:55 +0000</bug_when>
    <thetext>Sorry, I meant debian 9.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83737</commentid>
    <comment_count>8</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2019-05-08 13:49:51 +0000</bug_when>
    <thetext>Let&apos;s add a check in the init script so that it will fail early and loudly if dash is used and the CWD isn&apos;t correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84985</commentid>
    <comment_count>9</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2019-09-16 18:28:11 +0000</bug_when>
    <thetext>Fixed in 09923bbf467612a481a058d35f3717189b72477f (&quot;oe-init-build-env: Error out when failed to locate cwd&quot;)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>