[oe-commits] Bruce Ashfield : kernel-yocto: replace --is-ancestor with basic git porcelain commands
git at git.openembedded.org
git at git.openembedded.org
Sun Aug 31 10:04:53 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 3daffc3729f6374e1c8023ccf304ed5a93816b88
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3daffc3729f6374e1c8023ccf304ed5a93816b88
Author: Bruce Ashfield <bruce.ashfield at windriver.com>
Date: Sun Aug 31 01:18:24 2014 -0400
kernel-yocto: replace --is-ancestor with basic git porcelain commands
--is-ancestor is a relatively new git option [commit 5907cda1, Aug 30 2012].
To support build machines with older versions of git installed, we can use
the basic porcelain commands to acheive the same check.
merge-base: "--is-ancestor A B" can be replaced with:
if test "$(git rev-parse --verify A)" = "$(git merge-base A B)"
Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/kernel-yocto.bbclass | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index ee09769..929d64a 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -131,8 +131,7 @@ do_patch() {
# check to see if the specified SRCREV is reachable from the final branch.
# if it wasn't something wrong has happened, and we should error.
if [ "${machine_srcrev}" != "AUTOINC" ]; then
- git merge-base --is-ancestor ${machine_srcrev} HEAD
- if [ $? -ne 0 ]; then
+ if ! [ "$(git rev-parse --verify ${machine_srcrev})" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then
bberror "SRCREV ${machine_srcrev} was specified, but is not reachable"
bbfatal "Check the BSP description for incorrect branch selection, or other errors."
fi
More information about the Openembedded-commits
mailing list