Bug 3747 - an error appear when selecting kernel for yocto-bsp 1.4
Summary: an error appear when selecting kernel for yocto-bsp 1.4
Status: VERIFIED FIXED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4
Assignee: Ioana Grigoropol
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-01-17 15:13 UTC by Alexandru Georgescu
Modified: 2013-11-18 14:14 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
yocto-bsp (102.00 KB, image/jpeg)
2013-01-17 15:14 UTC, Alexandru Georgescu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Georgescu 2013-01-17 15:13:27 UTC
ENVIRONMENT USED
HOST: ubuntu 12.10 64bit.
Eclipse plugin: http://autobuilder.yoctoproject.org/pub/nightly/20130115-2/eclipse-plugin/
poky commit:9eb88ceb39b7d0b8ddc6487e61ce8edadef10ec4


STEPS TO REPRODUCE
1. Perform all the steps to install eclipse plugin.
2. get a poky clone, and check out the commit 9eb88ceb39b7d0b8ddc6487e61ce8edadef10ec4
3. Open yocto-bsp tool from Eclipse
4. Set the Metadata location to the poky folder.
5. Set up the build location, bsp name, bsp output location
6. Set kernel architecture (e.g. Set to qemu, and qemu architecture to i386 (or any combination))
7. Press next and in the yocto-bsp properties page select the kernel (e.g. linux-yocto_3.4)

EXPECTED RESULTS
7. Any kernel version can be selected

ACTUAL RESULT
7. An error appears (see attachment)

OTHER COMMENTS
Listing qemu in command line  works:


yocto@yocto-o1:~/_tests/adt-0115-2/yoyo/build$ yocto-bsp list qemu property \"linux-yocto_3.2\".new_kbranch
Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.2...
["standard/default/arm-versatile-926ejs", "standard/default/arm-versatile-926ejs"]
["standard/default/base", "standard/default/base"]
["standard/default/beagleboard", "standard/default/beagleboard"]
["standard/default/cedartrail", "standard/default/cedartrail"]
["standard/default/crownbay", "standard/default/crownbay"]
["standard/default/emenlow", "standard/default/emenlow"]
["standard/default/fishriver", "standard/default/fishriver"]
["standard/default/fri2", "standard/default/fri2"]
["standard/default/fsl-mpc8315e-rdb", "standard/default/fsl-mpc8315e-rdb"]
["standard/default/mti-malta32-be", "standard/default/mti-malta32-be"]
["standard/default/mti-malta32-le", "standard/default/mti-malta32-le"]
["standard/default/qemu-ppc32", "standard/default/qemu-ppc32"]
["standard/default/routerstationpro", "standard/default/routerstationpro"]
yocto@yocto-o1:~/_tests/adt-0115-2/yoyo/build$
Comment 1 Alexandru Georgescu 2013-01-17 15:14:18 UTC
Created attachment 1017 [details]
yocto-bsp
Comment 2 Ioana Grigoropol 2013-01-25 09:54:37 UTC
This error is caused when trying to run yocto-bsp script on a system that has the default /bin/sh set to dash.
Please check the output of:

ls -al /bin/sh 

and set it appropriately:

sudo rm /bin/sh && sudo ln -s /bin/bash /bin/sh
Comment 3 Alexandru Georgescu 2013-01-25 11:48:34 UTC
Hi,
I am reopening this issue because of the following:

- As far as I know, "sh" is linked to "dash" in all Ubuntu systems. This means that we will force all the users to remove the link to "dash", and this is not the desired behavior.

- a workaround to bypass the issue is to modify the script that runs yocto-bsp from eclipse-plugin to use "bash" instead of "sh".
Comment 4 Richard Purdie 2013-01-25 12:34:15 UTC
Agreed, please fix the script with bashisms to use bash or remove the bashisms.
Comment 5 Tom Zanussi 2013-02-07 17:04:58 UTC
I'm not able to reproduce this using either 'yocto-bsp create' or 'yocto-bsp list property' with /bin/sh == /bin/dash:

Using the following poky/master commit: 14fa964bbf8f3e2d798f8fd185c290a739cc8e0f

trz@elmorro:/usr/local/dev/yocto/isg-test/build$ ls -al /bin/sh
lrwxrwxrwx 1 root root 9 2013-02-07 10:57 /bin/sh -> /bin/dash

trz@elmorro:/usr/local/dev/yocto/isg-test/build$ yocto-bsp create test2 qemu

trz@elmorro:/usr/local/dev/yocto/isg-test/build$ yocto-bsp list qemu property \"linux-yocto_3.2\".new_kbranch
Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.2...
["standard/default/arm-versatile-926ejs", "standard/default/arm-versatile-926ejs"]
["standard/default/base", "standard/default/base"]
["standard/default/beagleboard", "standard/default/beagleboard"]
["standard/default/cedartrail", "standard/default/cedartrail"]
["standard/default/crownbay", "standard/default/crownbay"]
["standard/default/emenlow", "standard/default/emenlow"]
["standard/default/fishriver", "standard/default/fishriver"]
["standard/default/fri2", "standard/default/fri2"]
["standard/default/fsl-mpc8315e-rdb", "standard/default/fsl-mpc8315e-rdb"]
["standard/default/mti-malta32-be", "standard/default/mti-malta32-be"]
["standard/default/mti-malta32-le", "standard/default/mti-malta32-le"]
["standard/default/qemu-ppc32", "standard/default/qemu-ppc32"]
["standard/default/routerstationpro", "standard/default/routerstationpro"]
Comment 7 Alexandru Georgescu 2013-02-28 14:11:24 UTC
Hi Jessica,
The same error still appears.
I have tested with the latest eclipse plugin: http://autobuilder.yoctoproject.org/pub/nightly/20130228-1/eclipse-plugin/juno/
Comment 8 Alexandru Georgescu 2013-02-28 14:15:01 UTC
Also, the error appears on the latest Danny build, which can be found: http://autobuilder.yoctoproject.org/pub/nightly/20130226-2/eclipse-plugin/juno/

Should I open another bug for Danny?

Thanks,
Alex.
Comment 9 Jessica 2013-02-28 18:56:16 UTC
I installed the master nightly build one, and can't reproduce the issue.  For danny the patch is not pulled into the branch so please open a separate bug for it.
Comment 10 Alexandru Georgescu 2013-03-01 10:25:10 UTC
Hi Jessica, 
Can you verify that your /bin/sh is linked to dash, like my system is?

yocto@yocto-o1:~/denzil-0227$ ls -la /bin/sh
lrwxrwxrwx 1 root root 4 Nov  6 19:58 /bin/sh -> dash


As Ioana mentioned in a previous comment, the bug reproduces only when this link exists and I want to make sure that your system has it also when you verified with the latest on master.

Thanks,
Alex.
Comment 11 Jessica 2013-03-01 16:08:04 UTC
Yes, I have the same link for sh->dash, the fix is explicitly using bash to run yocto-bsp and solve the issue on the machine which originally i can reproduce the issue.  Assigning this to Ionan since she can access your environment to further diagnose.
Comment 12 Alexandru Georgescu 2013-03-04 13:44:35 UTC
There was a problem on my machine with the link to Dash.
The bug is solved.
Comment 13 Alexandru Georgescu 2013-03-04 13:48:51 UTC
verified.
Comment 14 Ioana Grigoropol 2013-03-06 12:07:29 UTC
"sh" is still used for creating the build directory for yocto-bsp.
Comment 15 Ioana Grigoropol 2013-03-06 12:08:11 UTC
Sent patch to list to use "bash" when creating the build directory.
Comment 17 Alexandru Georgescu 2013-11-18 14:14:11 UTC
verified.