Bug 8566

Summary: It's not documented that include/require checks the current directory in addition to BBPATH
Product: [Documentation] BitBake User Manual Reporter: ulfalizer
Component: bitbake-manualAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: bluelightning, srifenbark
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: 23 March 2016: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description ulfalizer 2015-10-25 12:40:25 UTC
This is the responsible code in lib/bb/parse/parse_py/ConfHandler.py, inside the include() function:

dname = os.path.dirname(parentfn)
bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True))
abs_fn, attempts = bb.utils.which(bbpath, fn, history=True)
Comment 1 Paul Eggleton 2015-10-26 09:04:29 UTC
Richard, I noticed you removed equivalent code from BBHandler just recently; did you mean to leave it in ConfHandler?
Comment 2 Paul Eggleton 2015-10-26 09:08:41 UTC
Actually, I'm not thinking straight - of course you wouldn't change this - the change was only for bbclass files. We should document this behaviour.
Comment 3 Scott Rifenbark 2015-10-27 12:50:53 UTC
So for this bug, I don't know where the related area would be in the BitBake Manual.  Can I get some guidance here?

Thanks
Comment 4 Scott Rifenbark 2015-10-27 12:58:31 UTC
In looking through the BB manual, there is a section http://www.yoctoproject.org/docs/2.0/bitbake-user-manual/bitbake-user-manual.html#sharing-functionality that talks about sharing functionality.  Is this the area we need this change in?  

Scott
Comment 5 Paul Eggleton 2015-10-27 13:02:03 UTC
It would make sense to document it in that section, yes. Probably under "Locating Include and Class Files"; but we need to be clear that the current directory is only checked for the require and include directives.
Comment 6 Scott Rifenbark 2015-10-27 13:56:20 UTC
Setting to 2.1 and ACCEPTED.
Comment 8 ulfalizer 2016-03-23 20:57:16 UTC
(In reply to comment #7)
> Hi, 
> 
> See
> http://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.
> html#locating-include-and-class-files and let me know if this is acceptable. 
> 
> Thanks,
> http://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.
> html#locating-include-and-class-files
> Scott

Looks good - thanks!
Comment 9 Scott Rifenbark 2016-03-23 21:46:47 UTC
Thanks, 

Setting to RESOLVED and putting the doc flag to "done."

Scott