| Summary: | Issues using bitbake with externalsrc and git | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Cliff Brake <cbrake> |
| Component: | bitbake | Assignee: | Markus Lehtonen <markus.lehtonen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | poky.bs.watcher, poky.watcher, sgw |
| Version: | unspecified | ||
| Target Milestone: | 2.2 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
First, it seems that there's a slight misunderstanding regarding externalsrc. In your case, "inherit externalsrc" actually has no effect at all. The externalsrc bbclass is supposed to be used in conjunction with defining EXTERNALSRC variable which is supposed to points to source tree. Externalsrc is meant (AFAIU) for building a recipe with user-specific modified local source tree, e.g. for quicker development/hacking. It is a bit hackish, e.g. it involves disabling build tasks, mangling SRC_URI etc and I wouldn't probably use it for production. At least that's how externalsrc is currently designed to work. Thus, you could drop this inherit statement altogether.
But, then, to the actual and real problem which you see. How I see it, you should be able to just do what you tried, i.e. something like (from your example):
SRCREV = "${AUTOREV}"
PV = "1.4+gitr${SRCPV}"
PR = "r1"
SRC_URI = "git://${FILE_DIRNAME};protocol=file;branch=HEAD;nobranch=1"
I'll send a patch to make this possible. Let's see what the response will be.
Patch sent for review: http://lists.openembedded.org/pipermail/bitbake-devel/2016-May/007475.html Re-based and re-sent: https://patchwork.openembedded.org/patch/128407/ A different solution under review: https://patchwork.openembedded.org/series/1763/ Fixed in bitbake master: http://git.openembedded.org/bitbake/commit/?id=2673fac5a9d06de937101e3fb2ddf1e60ff99abf Use the new 'usehead=1' url parameter in order to build HEAD. |
Hi, We would like to use bitbake with externalsrc recipes such that we can: * specify nobranch=1 in SRC_URI * SRCREV = "${AUTOREV}" * SRCPV = HEAD of externalsrc workspace Currently, SRCPV = git revision of the branch (default is master) which may or may not match what is actually built in the externalsrc directory. An additional issue is that you might change the git version to a different tag, and bitbake won't rebuild the recipe unless the git version of the branch specified changes. See this email thread for discussion: http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/78333 Thanks, Cliff