diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-04-01 10:09:34 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-02 18:04:08 +0100 |
commit | 0c389f41d7ea0697a5468c73cce295a2fa64e9e0 (patch) | |
tree | 040b0e650419b5ee8be21921022d69b5c72de695 /meta/classes/kernel-yocto.bbclass | |
parent | 1d7a5ac1cea1a5bdb6a9d3dd822439c070066272 (diff) | |
download | openembedded-core-0c389f41d7ea0697a5468c73cce295a2fa64e9e0.tar.gz openembedded-core-0c389f41d7ea0697a5468c73cce295a2fa64e9e0.tar.bz2 openembedded-core-0c389f41d7ea0697a5468c73cce295a2fa64e9e0.zip |
kernel-yocto: use KBRANCH as default build branch
commit 61001aa [kernel-yocto: respect SRC_URI modified branch selection]
changed branch processing such that a branch specified in the SRC_URI
would set the branch forced as the build branch.
This change broke compatibility with the yocto-bsp, linux-yocto-custom
based recipes. These recipes specify the branch to be built via KBRANCH,
but allow the fetcher to use master for keeping the repository up to
date. This means that no explicit branch is set in the SRC_URI and the
routines return the default branch of 'master', which is not what is
set in KBRANCH.
To support this case, we simply pass a default branch into the routine
returning the branch to build, and ensure that the default is KBRANCH
so if no branch is passed in the SRC_URI, KBRANCH is always built.
[YOCTO #4145]
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 7b8e6075f2..d1b4f10254 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass @@ -46,7 +46,7 @@ def find_kernel_feature_dirs(d): # find the master/machine source branch. In the same way that the fetcher proceses # git repositories in the SRC_URI we take the first repo found, first branch. -def get_machine_branch(d): +def get_machine_branch(d, default): fetch = bb.fetch2.Fetch([], d) for url in fetch.urls: urldata = fetch.ud[url] @@ -55,7 +55,7 @@ def get_machine_branch(d): branches = urldata.parm.get("branch").split(',') return branches[0] - return "master" + return default do_patch() { cd ${S} @@ -70,7 +70,7 @@ do_patch() { fi fi - machine_branch="${@ get_machine_branch(d)}" + machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}" # if we have a defined/set meta branch we should not be generating # any meta data. The passed branch has what we need. @@ -195,7 +195,8 @@ do_kernel_checkout() { fi fi - machine_branch="${@ get_machine_branch(d)}" + machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}" + if [ "${KBRANCH}" != "${machine_branch}" ]; then echo "WARNING: The SRC_URI machine branch and KBRANCH are not the same." echo " KBRANCH will be adjusted to match, but this typically is a" @@ -280,7 +281,7 @@ do_validate_branches() { cd ${S} export KMETA=${KMETA} - machine_branch="${@ get_machine_branch(d)}" + machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}" set +e # if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to |