All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Denys Dmytriyenko <denis@denix.org>, Ryan Eatmon <reatmon@ti.com>
Cc: <devarsht@ti.com>, <meta-ti@lists.yoctoproject.org>,
	<praneeth@ti.com>, <nikhil.nd@ti.com>, <nsekhar@ti.com>,
	<vigneshr@ti.com>, <a-m1@ti.com>, Nishanth Menon <nm@ti.com>,
	Denys Dmytriyenko <denys@konsulko.com>
Subject: [PATCH] u-boot-ti: Use SRCPV instead of SRCREV for U_BOOT_LOCAL_VERSION
Date: Wed, 27 Apr 2022 22:08:28 -0500	[thread overview]
Message-ID: <20220428030828.18705-1-nm@ti.com> (raw)

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)

 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



                 reply	other threads:[~2022-04-28  3:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220428030828.18705-1-nm@ti.com \
    --to=nm@ti.com \
    --cc=a-m1@ti.com \
    --cc=denis@denix.org \
    --cc=denys@konsulko.com \
    --cc=devarsht@ti.com \
    --cc=meta-ti@lists.yoctoproject.org \
    --cc=nikhil.nd@ti.com \
    --cc=nsekhar@ti.com \
    --cc=praneeth@ti.com \
    --cc=reatmon@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.