Patchwork [2/3] linux-yocto: safely process unbranched repositories

login
register
mail settings
Submitter Bruce Ashfield
Date May 5, 2011, 4:53 a.m.
Message ID <86b90b0142aebf97b4d1fdaa2ac07463bee497ac.1304570401.git.bruce.ashfield@windriver.com>
Download mbox | patch
Permalink /patch/3205/
State New, archived
Headers show

Comments

Bruce Ashfield - May 5, 2011, 4:53 a.m.
The BSP bootstrap and -dev use cases can be applied against
unbranched or repos without meta data. To allow the proper
and safe processing of those repositories, slight modifications
to the tools are required to pass the branch on the command
line (rather than detecting it always) and to only checkout
branches that exist.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/classes/kernel-yocto.bbclass                  |    7 +++++--
 .../kern-tools/kern-tools-native_git.bb            |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 78a1309..ffc0b4c 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -25,7 +25,7 @@  do_patch() {
 			addon_features="$addon_features --feature $feat"
 		done
 	fi
-	updateme ${addon_features} ${ARCH} ${MACHINE} ${WORKDIR}
+	updateme --branch ${kbranch} ${addon_features} ${ARCH} ${MACHINE} ${WORKDIR}
 	if [ $? -ne 0 ]; then
 		echo "ERROR. Could not update ${kbranch}"
 		exit 1
@@ -87,9 +87,12 @@  do_kernel_configme() {
 	if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then
            # switch from a generic to a specific branch
            kbranch=${YOCTO_KERNEL_EXTERNAL_BRANCH}
+           cd ${S}
+           git checkout ${kbranch}
+	else
+	   cd ${S}
 	fi
 
-	cd ${S}
 	configme --reconfig --output ${B} ${kbranch} ${MACHINE}
 	if [ $? -ne 0 ]; then
 		echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index cc71179..820765e 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@  LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=e2bf4415f3d8
 
 DEPENDS = "git-native guilt-native"
 
-SRCREV = "92b965b02e3ac32badde3ee71a1e7d3a85cedeb8"
+SRCREV = "c5896a60acc61f8966cfee3bb241ff564610cea4"
 PR = r10
 PV = "0.1+git${SRCPV}"