<?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>5945</bug_id>
          
          <creation_ts>2014-03-11 16:03:35 +0000</creation_ts>
          <short_desc>lsbtest doesn&apos;t work with dash</short_desc>
          <delta_ts>2014-04-15 12:21:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>General Runtime</product>
          <component>General Runtime</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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>1.6 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stoicescu Cornel">corneliux.stoicescu</reporter>
          <assigned_to name="Stefan Stanacar">sstncr</assigned_to>
          <cc>bluelightning</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</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>41092</commentid>
    <comment_count>0</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2014-03-11 16:03:35 +0000</bug_when>
    <thetext>Tested on Ubuntu 13.10 with:
1) Latest poky master:5f81d9d1fa537445d5da49e12de1e16300e94552
2) Yocto 1.4.3 RC3, dylan:7ab82abcad9ede847c42c01d2a4f4c2c18877e6f

Steps to reproduce:

1. &apos;bitbake lsbtest&apos;. Notice recipe builds successfully. 
2. look inside log.do_install for lsbtest

Notice errors:
DEBUG: Executing shell function do_install
/home/cornel/SSD/poky/2build/tmp/work/i586-poky-linux/lsbtest/1.0-r3/temp/run.do_install.18156: 107: [: i586: unexpected operator
/home/cornel/SSD/poky/2build/tmp/work/i586-poky-linux/lsbtest/1.0-r3/temp/run.do_install.18156: 111: [: i586: unexpected operator
/home/cornel/SSD/poky/2build/tmp/work/i586-poky-linux/lsbtest/1.0-r3/temp/run.do_install.18156: 115: [: i586: unexpected operator
/home/cornel/SSD/poky/2build/tmp/work/i586-poky-linux/lsbtest/1.0-r3/temp/run.do_install.18156: 125: [: i586: unexpected operator
DEBUG: Shell function do_install finished

EXPECTED OUTCOME: Task do_install should have failed

NOTE: My system uses dash as system shell:
cornel@NODE-3:$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Feb 13 16:56 /bin/sh -&gt; dash

Dash does not correctly parse the following type of statement:
#!/bin/sh
if [ &quot;i586&quot; == &quot;i586&quot; ];then
...

This requires either we use bash specifically or we correct the statement like this:
#!/bin/sh
if [ &quot;i586&quot; = &quot;i586&quot; ];then
...


Because this is an issue with both 1.4.3 and master and I believe it was always there, I am setting this under Yocto 1.4 version. We never discovered this because we never built lsb images using distributions that use dash as system shell, like Ubuntu 13.10 .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41110</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-03-12 00:31:59 +0000</bug_when>
    <thetext>Patch provided already!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41123</commentid>
    <comment_count>2</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2014-03-12 07:26:33 +0000</bug_when>
    <thetext>There is also the issue where do_install task passed when it should have failed. Should I  open a new bug for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41871</commentid>
    <comment_count>3</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2014-03-27 16:56:39 +0000</bug_when>
    <thetext>Cornel: yes, I think that&apos;s a different issue than the one with package not working as expected. If that happens on master with this reverted it should be a different bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41872</commentid>
    <comment_count>4</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2014-03-27 16:56:59 +0000</bug_when>
    <thetext>Fixes for bashisms in the recipe/script:
For dylan:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d6dc48f5fb4d2e12605a1677e6270f13bb323649

For master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dylan&amp;id=b95c05db58b3a2d1c3eb1a168f4abb851d3e69ca</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42665</commentid>
    <comment_count>5</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2014-04-15 12:21:24 +0000</bug_when>
    <thetext>The fixes worked in both 1.4.3 and 1.6 master. Setting to VERIFIED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>