summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-04-01 10:09:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-02 18:08:23 +0100
commit5638954a184010a1c2a5eafb5619e096fb561a99 (patch)
treebe24e74a1ffb1b4529eb3b6ed7d5d302567222a3 /meta
parent8452199a895c3e77d4cf360408b3140f6dc7521a (diff)
downloadpoky-5638954a184010a1c2a5eafb5619e096fb561a99.tar.gz
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] (From OE-Core rev: 0c389f41d7ea0697a5468c73cce295a2fa64e9e0) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel-yocto.bbclass11
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):
46 46
47# find the master/machine source branch. In the same way that the fetcher proceses 47# find the master/machine source branch. In the same way that the fetcher proceses
48# git repositories in the SRC_URI we take the first repo found, first branch. 48# git repositories in the SRC_URI we take the first repo found, first branch.
49def get_machine_branch(d): 49def get_machine_branch(d, default):
50 fetch = bb.fetch2.Fetch([], d) 50 fetch = bb.fetch2.Fetch([], d)
51 for url in fetch.urls: 51 for url in fetch.urls:
52 urldata = fetch.ud[url] 52 urldata = fetch.ud[url]
@@ -55,7 +55,7 @@ def get_machine_branch(d):
55 branches = urldata.parm.get("branch").split(',') 55 branches = urldata.parm.get("branch").split(',')
56 return branches[0] 56 return branches[0]
57 57
58 return "master" 58 return default
59 59
60do_patch() { 60do_patch() {
61 cd ${S} 61 cd ${S}
@@ -70,7 +70,7 @@ do_patch() {
70 fi 70 fi
71 fi 71 fi
72 72
73 machine_branch="${@ get_machine_branch(d)}" 73 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
74 74
75 # if we have a defined/set meta branch we should not be generating 75 # if we have a defined/set meta branch we should not be generating
76 # any meta data. The passed branch has what we need. 76 # any meta data. The passed branch has what we need.
@@ -195,7 +195,8 @@ do_kernel_checkout() {
195 fi 195 fi
196 fi 196 fi
197 197
198 machine_branch="${@ get_machine_branch(d)}" 198 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
199
199 if [ "${KBRANCH}" != "${machine_branch}" ]; then 200 if [ "${KBRANCH}" != "${machine_branch}" ]; then
200 echo "WARNING: The SRC_URI machine branch and KBRANCH are not the same." 201 echo "WARNING: The SRC_URI machine branch and KBRANCH are not the same."
201 echo " KBRANCH will be adjusted to match, but this typically is a" 202 echo " KBRANCH will be adjusted to match, but this typically is a"
@@ -280,7 +281,7 @@ do_validate_branches() {
280 cd ${S} 281 cd ${S}
281 export KMETA=${KMETA} 282 export KMETA=${KMETA}
282 283
283 machine_branch="${@ get_machine_branch(d)}" 284 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
284 285
285 set +e 286 set +e
286 # if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to 287 # if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to