]> code.ossystems Code Review - meta-freescale.git/commitdiff
fsl-u-boot-localversion.bbclass: Ensure git is run inside ${S}
authorOtavio Salvador <otavio@ossystems.com.br>
Fri, 19 Aug 2016 20:36:19 +0000 (17:36 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Wed, 24 Aug 2016 02:26:55 +0000 (23:26 -0300)
The tasks does not run inside ${S} by default anymore so we must
ensure to run Git inside it.

Change-Id: I9bba889ed13cc386d23fa4efdac2af5b46e2d65b
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
classes/fsl-u-boot-localversion.bbclass

index f7e097141487be22dac71d03d2bf0c2c141e1c91..617aae1de215debc8f155355a462175b8909e9f0 100644 (file)
@@ -17,7 +17,7 @@ UBOOT_LOCALVERSION = "${LOCALVERSION}"
 do_compile_prepend() {
        if [ "${SCMVERSION}" = "y" ]; then
                # Add GIT revision to the local version
-               head=`git rev-parse --verify --short HEAD 2> /dev/null`
+               head=`cd ${S} ; git rev-parse --verify --short HEAD 2> /dev/null`
                printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${S}/.scmversion
                printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${B}/.scmversion
     else