meta-ti.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [dunfell PATCH V2] u-boot-ti: Use SRCPV instead of SRCREV for U_BOOT_LOCAL_VERSION
@ 2022-04-28  3:14 Nishanth Menon
  2022-04-28 12:14 ` Ryan Eatmon
  0 siblings, 1 reply; 2+ messages in thread
From: Nishanth Menon @ 2022-04-28  3:14 UTC (permalink / raw)
  To: Denys Dmytriyenko, Ryan Eatmon
  Cc: devarsht, meta-ti, praneeth, nikhil.nd, nsekhar, vigneshr, a-m1,
	Nishanth Menon, Denys Dmytriyenko

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#automatically-incrementing-a-binary-package-revision-number

Fixes: 39fa0c1d3d02 ("u-boot-ti: Use SRCREV to get short commit ID")
Suggested-by: Denys Dmytriyenko <denys@konsulko.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---

I think we had a case of dunfell updated with a partial fix.

as discussed in review of the original patch:
https://lore.kernel.org/all/20220427144355.GK9834@denix.org/
a) we should have used SRCPV that deals with AUTOREV better
b) we should have fixed the kernel rev as well.. which is broke as well
(follow on patch)

Changes since V1:
* Update to fix up the $subject to indicate the branch. (sorry for the
  noise).

V1: https://lore.kernel.org/all/20220428030828.18705-1-nm@ti.com/

 recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc
index cc775e2e271c..903c61f09004 100644
--- a/recipes-bsp/u-boot/u-boot-ti.inc
+++ b/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 = "-g${@d.getVar("SRCREV", False).__str__()[:10]}"
+UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV', True).split('+')[1]}"
 
 UBOOT_SUFFIX ?= "img"
 SPL_BINARY ?= "MLO"
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [dunfell PATCH V2] u-boot-ti: Use SRCPV instead of SRCREV for U_BOOT_LOCAL_VERSION
  2022-04-28  3:14 [dunfell PATCH V2] u-boot-ti: Use SRCPV instead of SRCREV for U_BOOT_LOCAL_VERSION Nishanth Menon
@ 2022-04-28 12:14 ` Ryan Eatmon
  0 siblings, 0 replies; 2+ messages in thread
From: Ryan Eatmon @ 2022-04-28 12:14 UTC (permalink / raw)
  To: Nishanth Menon, Denys Dmytriyenko
  Cc: devarsht, meta-ti, praneeth, nikhil.nd, nsekhar, vigneshr, a-m1,
	Denys Dmytriyenko


Patch applied to dunfell-wip.


On 4/27/2022 22:14, Nishanth Menon wrote:
> 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#automatically-incrementing-a-binary-package-revision-number
> 
> Fixes: 39fa0c1d3d02 ("u-boot-ti: Use SRCREV to get short commit ID")
> Suggested-by: Denys Dmytriyenko <denys@konsulko.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> 
> I think we had a case of dunfell updated with a partial fix.
> 
> as discussed in review of the original patch:
> https://lore.kernel.org/all/20220427144355.GK9834@denix.org/
> a) we should have used SRCPV that deals with AUTOREV better
> b) we should have fixed the kernel rev as well.. which is broke as well
> (follow on patch)
> 
> Changes since V1:
> * Update to fix up the $subject to indicate the branch. (sorry for the
>    noise).
> 
> V1: https://lore.kernel.org/all/20220428030828.18705-1-nm@ti.com/
> 
>   recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc
> index cc775e2e271c..903c61f09004 100644
> --- a/recipes-bsp/u-boot/u-boot-ti.inc
> +++ b/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 = "-g${@d.getVar("SRCREV", False).__str__()[:10]}"
> +UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV', True).split('+')[1]}"
>   
>   UBOOT_SUFFIX ?= "img"
>   SPL_BINARY ?= "MLO"

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-28 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28  3:14 [dunfell PATCH V2] u-boot-ti: Use SRCPV instead of SRCREV for U_BOOT_LOCAL_VERSION Nishanth Menon
2022-04-28 12:14 ` Ryan Eatmon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).