summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2020-03-05 13:27:07 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2020-03-05 13:51:46 +0100
commit3e645e66daea9951a02b9de0f52864a79389e23a (patch)
treed48d37f2bf286eee29303d6b025a6b48973eaeb1
parenta49daf2f134e019d528566cf1903d4a3ce211297 (diff)
toradex-kernel-localversion.bbclass: fix set scmversion with autorev
Handle the case where SRCREV is set to AUTOREV. fixes: f22318f toradex-kernel-localversion.bbclass: use SRCREV to set scmversion Related-to: TOR-694 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--classes/toradex-kernel-localversion.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/classes/toradex-kernel-localversion.bbclass b/classes/toradex-kernel-localversion.bbclass
index 6792d18..766bd0a 100644
--- a/classes/toradex-kernel-localversion.bbclass
+++ b/classes/toradex-kernel-localversion.bbclass
@@ -23,6 +23,9 @@ kernel_do_configure_append() {
# Add GIT revision to the local version
if [ -n "${SRCREV_machine}" -a "${SRCREV_machine}" != "INVALID" ]; then
head=`git --git-dir=${S}/.git rev-parse --verify --short ${SRCREV_machine} 2> /dev/null`
+ elif [ -n "${SRCREV}" -a "${SRCREV}" = "AUTOINC" ]; then
+ branch=`git --git-dir=${S}/.git symbolic-ref --short -q HEAD`
+ head=`git --git-dir=${S}/.git rev-parse --verify --short origin/${branch} 2> /dev/null`
elif [ -n "${SRCREV}" -a "${SRCREV}" != "INVALID" ]; then
head=`git --git-dir=${S}/.git rev-parse --verify --short ${SRCREV} 2> /dev/null`
else