[bitbake-devel] devtool hardcodes using 'git' patchtool which causes errors

Adrian Ambrożewicz adrian.ambrozewicz at linux.intel.com
Thu Jan 23 10:02:45 UTC 2020

I've tried yet another approach, leveraging that this project is built 
using cmake and it worked! I know it's not a generic fix, but it looks 
like in bitbake nothing is really generic...

Instead of having project set like this:
SRC_URI = '[path_to_repo]'
S = '${WORKDIR}/git/project_dir'

I've set it like this:
SRC_URI = "[path_to_repo]"
S = "${WORKDIR}/git"
OECMAKE_SOURCEPATH = "${S}/virtual-media"

In that way both quilt and git patcher uses proper 'S' directory, while 
Cmake perform compilation from desired subdirectory.

I just hope I won't stumble into this kind of problem with another build 
system :)

Thanks a lot for your input, it lead me to correct track.


W dniu 1/22/2020 o 16:49, Adrian Ambrożewicz pisze:
> It looks like git:// fetcher option 'subpath' might be good alternative 
> designed to address those kind of issues.
> Setting:
> SRC_URI = '[repopath];subpath=project_dir'
> S = '${WORKDIR}/project_dir'
> works exactly the same as my previous approach when it comes to 'bitbake 
> -c patch [project]'
> Unfortunately it looks like devtool ignores that param and clones whole 
> repository structure. I'll try fiddling around to implement that support 
> in devtool.
> W dniu 1/22/2020 o 16:10, Alexander Kanavin pisze:
>> On Wed, 22 Jan 2020 at 16:06, Adrian Ambrożewicz 
>> <adrian.ambrozewicz at linux.intel.com 
>> <mailto:adrian.ambrozewicz at linux.intel.com>> wrote:
>>     My question is - is there a way to have both of these patchers 
>> working
>>     with such folder structure? Maybe 'S' overwriting was not a good idea
>>     after all?
>> I guess the problem here is that S is used for both patching and 
>> building, and the 'root' for these may not necessarily match. Maybe 
>> there could be a variable that, when set, overrides S for the purpose 
>> of patching.
>> Alex

More information about the bitbake-devel mailing list