Bug 10215 - Add a class which allows buiding git upstream versions of code using BBCLASSEXTEND
Summary: Add a class which allows buiding git upstream versions of code using BBCLASSE...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 2.3 M3
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-03 09:25 UTC by Richard Purdie
Modified: 2017-03-20 17:32 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2016-09-03 09:25:00 UTC
In many cases we have a latest version recipe and also a _git.bb recipe which builds a version taken from the upstream scm. We also have users who bbappend our base recipes to get latest upstream versions.

I'd like to explore whether we could put this metadata about where the upstream git repo is, into the main recipe to make some of these usages easier. Another benefit could potentially be a comeback of "poky-bleeding" where the idea was to test upstream code changes so we could react to them, before they make it into release tarballs.

The idea would be a gitupstream.bbclass which would:

* Rename GITSRC_URI to SRC_URI
* Rename GITSRCREV to SRCREV
* Set ${S} = ${WORKDIR}/git
* Set DEFAULT_PREFERENCE = "-1"
* Update PV to add +git${SRVPV}

It might optionally be able to so some kind of search and replace on SRC_URI to place the git upstream in there for complex recipes, I'm undecided about this right now.

It would be activated by the user marking up the recipe with GITSRC_URI and GITSRCREV and then adding "gitupstream" to BBCLASSEXTEND.

I'm sure there are some issues we'll run into and it won't be quite this simple but I thought the idea worth documenting and perhaps investigating.
Comment 1 Ross Burton 2016-11-16 17:24:26 UTC
Status: I've a prototype that works fine for target recipes, but also working for native is "non trivial".
Comment 2 Ross Burton 2017-03-20 17:32:25 UTC
Merged in oe-core c48ef2d7c7198232846f36a975c673cc57f4a090.