summaryrefslogtreecommitdiff
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-08 10:35:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-08 12:05:36 +0000
commit65712be7369c20d7577f563167c49dd4fd466da6 (patch)
tree9a43c0b9cb26b54cf515e372f1d8492ac08ff20c /meta/classes/kernel-yocto.bbclass
parentbd2fd821a3bf155da30ac2378760bf27103d1457 (diff)
downloadopenembedded-core-65712be7369c20d7577f563167c49dd4fd466da6.tar.gz
openembedded-core-65712be7369c20d7577f563167c49dd4fd466da6.tar.bz2
openembedded-core-65712be7369c20d7577f563167c49dd4fd466da6.tar.xz
openembedded-core-65712be7369c20d7577f563167c49dd4fd466da6.zip
kernel-yocto: Ensure python code has awlays run before SRCPV is expanded
The python code in this class file needs to run before SRCPV is expanded and calls into the fetcher are made. To so this we create a python function and prepend a call to it before SRCPV's get_srcrev() call. Ugly, ugly, ugly but the ordering is guaranteed. If this doesn't happen, the fetcher can end up in two different states and there may be caching implications of this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r--meta/classes/kernel-yocto.bbclass11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 2e01948eb..4c52bca43 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -9,7 +9,13 @@ S = "${WORKDIR}/linux"
# branch that is always present 'standard'. This sets the KBRANCH variable
# and is used in the SRC_URI. The machine is then set back to ${MACHINE},
# since futher processing will use that to create local branches
-python __anonymous () {
+
+SRCPV_prepend = "${@yoctokernel_variables_fixup(d)}"
+
+def yoctokernel_variables_fixup(d):
+ if d.getVar("PVFIXUPDONE", False) is "done":
+ return ""
+
import bb, re, string
version = bb.data.getVar("LINUX_VERSION", d, 1)
@@ -47,7 +53,8 @@ python __anonymous () {
bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), bb.data.expand("${MACHINE}",d), d)
bb.data.setVar("KBRANCH", "yocto/standard/base", d)
bb.data.setVar("BOOTSTRAP", "yocto/standard/" + bb.data.expand("${MACHINE}",d), d)
-}
+ d.setVar("PVFIXUPDONE", "done")
+ return ""
do_patch() {
cd ${S}