Bug 5330

Summary: yocto-bsp error on 3.10 kernel
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Alexandru Georgescu <alexandru.c.georgescu>
Component: eclipse-pluginAssignee: Jessica <jessica.zhang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dvhart, ioanax.grigoropol, jessica.zhang, srifenbark, tom.zanussi, yp.ep.watcher, yp.watcher
Version: 1.5   
Target Milestone: 1.5.1   
Hardware: x86   
OS: Multiple   
Whiteboard: 14 October 2013: Setting docs to not affected
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
yocto-bsp none

Description Alexandru Georgescu 2013-10-09 14:12:25 UTC
Created attachment 1557 [details]
yocto-bsp

poky: dora:102bf5e0f640fe85068452a42b85077f1c81e0c9
eclipse-poky-kepler:ad74249895f882a8f00bdeef7a0f7c18998cc43e

eclipse-kepler: http://autobuilder.yoctoproject.org/pub/releases/1.5_M5.rc6/eclipse-plugin/kepler/org.yocto.sdk-development-201310081714-archive.zip


I keep getting this error when trying to create a yocto-bsp with kepler or juno.

STEPS:
1. perform a headless build for kepler and install the eclipse plugin
2. on the host, get a poky clone
3. in eclipse, try to create a yocto-bsp with the poky clone set as metadata location
4. in the yocto-bsp properties page select a kernel (*e.g. 3.10

5. On step 4 I have the following error (see attachment):

/bin/sh: bitbake not found


NOTE:
If using the same plugin but combine with an early version of poky, e.g: 

853bc53cd58a621918f0e5ce662dba263d1befb4 
Date:   Wed Sep 18 20:55:30 2013 +0000

I don't have this err, but neither kernel 3.10

NOTE2: I could create a yocto-bsp layer from the console with 3.10 kernel.
Comment 1 Alexandru Georgescu 2013-10-10 14:51:21 UTC
I have the same behavior on different distros.
Comment 2 Jessica 2013-10-11 19:30:25 UTC
After debugging the issue, it is due to latest changes in yocto-bsp tool.  Eclipse plug-in relies on the following command format from yocto-bsp tool to return values:

export export BUILDDIR=/home/jzhang/poky/build;/home/jzhang/poky/scripts/yocto-bsp list karch
Architectures available:
    powerpc
    x86_64
    arm
    i386
    mips
    qemu

obviously, with the recent changes, now I'm getting 
export BUILDDIR=/home/jzhang/poky/build;/home/jzhang/poky/scripts/yocto-bsp list qemu property \"linux-yocto_3.10\".new_kbranch
/bin/sh: bitbake: command not found
Couldn't get 'bitbake -e' output, exiting.
 
when trying to get kernel branches with the kernel selection.
Comment 3 Tom Zanussi 2013-10-11 19:44:17 UTC
Yes, this is expected - yocto-bsp has always expected the build environment sourced before use. i.e. from the bblayers parsing code:

print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)"

So just source oe-init-build-env and you should be fine.
Comment 4 Jessica 2013-10-11 19:50:53 UTC
Tom,

Why we don't have to do the environment script before? Look at the bug report history, this is the change introduced lately, we have never change anything in our plugin code and before it used to work.  Also, other command, e.g. export export BUILDDIR=/home/jzhang/poky/build;/home/jzhang/poky/scripts/yocto-bsp list karch still works without sourcing the environment file.
Comment 5 Tom Zanussi 2013-10-11 19:59:23 UTC
(In reply to comment #4)
> Tom,
> 
> Why we don't have to do the environment script before? Look at the bug
> report history, this is the change introduced lately, we have never change
> anything in our plugin code and before it used to work.  Also, other
> command, e.g. export export
> BUILDDIR=/home/jzhang/poky/build;/home/jzhang/poky/scripts/yocto-bsp list
> karch still works without sourcing the environment file.

You got lucky before - exporting BUILDDIR is only one of the things that oe-init-build-env does.  And the karch code doesn't require bblayers to be parsed to accomplish.

Basically being able to get bitbake -e output is the only way to fix bug 5106, which is what the fix for that does.

It's never been expected that people would be running yocto-bsp without sourcing the environent first.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5106
Comment 7 Scott Rifenbark 2013-10-14 17:08:41 UTC
This does not affect documentation.  I am marking the doc field appropriately.

Scott
Comment 8 Alexandru Georgescu 2013-11-18 14:51:54 UTC
verified.