Bug 5063 - running bitbake from a location inside build/ gives python trace call
Summary: running bitbake from a location inside build/ gives python trace call
Status: VERIFIED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5 M5
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard: 01 October 2013 - Completed Doc requi...
Depends on:
Blocks:
 
Reported: 2013-08-28 14:18 UTC by Stoicescu Cornel
Modified: 2013-10-01 15:23 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments
python trace call (2.15 KB, text/plain)
2013-08-28 14:18 UTC, Stoicescu Cornel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stoicescu Cornel 2013-08-28 14:18:36 UTC
Created attachment 1445 [details]
python trace call

master:2051e4dff4384e1b618a050aeebf72a76cadab4b

1) clone poky master
2) source the build environment
3) change current directory to build/conf
4) issue command "bitbake man"

Notice Python trace call (see attached)
Comment 1 Robert Yang 2013-08-29 10:04:29 UTC
After talked with Paul E, it seems that we had two methods to fix it:

1) Change the include conf/local.conf to require con/local.conf

Or

2) Add a check for CONF_VERSION in sanity.bbclass, sys.exit(1) if it is None,
   but this is a little late since the cache, sstate-cache and tmp-eglibc dirs
   would be created in the conf dir.
Comment 2 Robert Yang 2013-08-29 10:09:35 UTC
(In reply to comment #1)
> After talked with Paul E, it seems that we had two methods to fix it:
> 
> 1) Change the include conf/local.conf to require con/local.conf
> 

For the way 1, the problem is that there maybe really a loca.conf, but we are just looking for it in the wrong place.

> Or
> 
> 2) Add a check for CONF_VERSION in sanity.bbclass, sys.exit(1) if it is None,
>    but this is a little late since the cache, sstate-cache and tmp-eglibc
> dirs
>    would be created in the conf dir.
Comment 3 Robert Yang 2013-08-29 12:33:55 UTC
RP's Patch, and the document needs update:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=rpurdie/wip76

this means we'd now support:
a) running bitbake xxx anywhere within a build directory (the first patch)
b) running bitbake xxx anywhere at all if BBPATH is set to the build directory
Comment 4 Stoicescu Cornel 2013-08-29 12:37:15 UTC
Test cases created:
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=789
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=790

Will add them to future master branch Test Runs
Comment 6 Stoicescu Cornel 2013-10-01 14:46:51 UTC
Verified in:
poky master:2f64fae60b3f61a2c45dc9e5314d2d16b1e64605
Comment 7 Scott Rifenbark 2013-10-01 15:07:11 UTC
Hi, 

I am not convinced that we need to change the documentation for this bug.  Right now, we specify that TOPDIR points to the build directory.  Within the documentation set, we do not restrict the user to being in any specific directory when they run the 'bitbake' command.  

I am going to mark the docs as not needed here.

Scott
Comment 8 Scott Rifenbark 2013-10-01 15:23:25 UTC
Hi, 

After talking with Corneliu about this bug it was decided a small documentation change for the BBPATH variable was in order.  I added a note to the definition stating that if you run bitbake from outside the build directory, you need to have BBPATH set to point to the build directory.  You can see the change here - http://www.yoctoproject.org/docs/1.5/ref-manual/ref-manual.html#var-BBPATH

I updated the doc requirement to "done".

Scott