From patchwork Mon May 16 16:52:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/1] linux-yocto: detect and avoid branch revision checking for AUTOREV Date: Mon, 16 May 2011 16:52:36 -0000 From: Bruce Ashfield X-Patchwork-Id: 4135 Message-Id: <8d26746c2a90672a3f86cbec021b9f450d38cb73.1305564106.git.bruce.ashfield@windriver.com> To: richard.purdie@linuxfoundation.org Cc: openembedded-core@lists.openembedded.org, saul.wold@intel.com When a BSP or layer specifies an AUTOREV for SRCREV, the logic that matches expected vs real branch heads doesn't apply. We always want the latest. To solve the issues with invalid git revs causing validation failures, we detect the AUTOINC value and do a early return, skipping validation. Signed-off-by: Bruce Ashfield --- meta/classes/kernel-yocto.bbclass | 7 +++++++ .../kern-tools/kern-tools-native_git.bb | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 818a07e..536434f 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass @@ -136,6 +136,13 @@ do_validate_branches() { return fi + # nothing to do if SRCREV=${AUTOREV} + if [ "${SRCREV_machine}" = "AUTOINC" ]; then + # restore the branch for builds + git checkout -f ${KBRANCH} + return + fi + branch_head=`git show-ref -s --heads ${KBRANCH}` meta_head=`git show-ref -s --heads ${KMETA}` target_branch_head="${SRCREV_machine}" 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 829d105..f7600ca 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 = "ecbdf3cdf6705a63dcb3c50bb24c311046f0b35c" +SRCREV = "f8eb067b023d590b6cd8deddf6f96d6a820997af" PR = r10 PV = "0.1+git${SRCPV}"