[master][PATCH 01/10] u-boot-ti: Use SRCPV instead of SRCREV for U_BOOT_LOCAL_VERSION


Denys Dmytriyenko
 

From: Nishanth Menon <nm@...>

SRCREV works with fixed commits, but when we use AUTOREV for a
downstream distro bbappend, we will end up getting a bad local
revision.

Lets use SRCPV instead, which bitbake already deals with sensibly.

[1] https://www.yoctoproject.org/docs/2.5.1/dev-manual/dev-manual.html#au=
tomatically-incrementing-a-binary-package-revision-number

Fixes: 39fa0c1d3d02 ("u-boot-ti: Use SRCREV to get short commit ID")
Suggested-by: Denys Dmytriyenko <denys@...>
Signed-off-by: Nishanth Menon <nm@...>
Signed-off-by: Ryan Eatmon <reatmon@...>
Signed-off-by: Denys Dmytriyenko <denys@...>
---
meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/r=
ecipes-bsp/u-boot/u-boot-ti.inc
index 5ddcaff7..dddf6284 100644
--- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
+++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
@@ -1,6 +1,6 @@
# UBOOT_LOCALVERSION can be set to add a tag to the end of the
# U-boot version string. such as the commit id
-UBOOT_LOCALVERSION =3D "-g${@d.getVar("SRCREV", False).__str__()[:10]}"
+UBOOT_LOCALVERSION =3D "-g${@d.getVar('SRCPV', True).split('+')[1]}"
=20
UBOOT_SUFFIX ?=3D "img"
SPL_BINARY ?=3D "MLO"
--=20
2.25.1