From: Alexander Kanavin <alex.kanavin@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 2/2] bitbake-setup: correctly determine latest revision in status/update when it is fixed to a commit id
Date: Thu, 5 Mar 2026 21:09:37 +0100 [thread overview]
Message-ID: <20260305200937.221484-2-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20260305200937.221484-1-alex.kanavin@gmail.com>
From: Alexander Kanavin <alex@linutronix.de>
The code was relying on git fetcher's latest_revision() method,
which works properly if the revision in the json config template
is set to a branch or a tag, but does not work if it is set to
a fixed revision (the method will return the latest revision on the
respective branch, and bitbake-setup will incorrectly determine
that the layer needs to be updated to that revision).
Add a guard to check if revision is a commit id, and skip the
check if so.
[YOCTO #16190]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
bin/bitbake-setup | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 1a42aaa51..69362b589 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -741,9 +741,13 @@ def get_diff(file1, file2):
return None
def are_layers_changed(layers, layerdir, d):
+ from bb.fetch2.git import sha1_re
+
def _is_git_remote_changed(r_remote, repodir):
changed = False
rev = r_remote['rev']
+ if sha1_re.match(rev):
+ return False
branch = r_remote.get('branch', None)
remotes = _get_remotes(r_remote)
--
2.47.3
next prev parent reply other threads:[~2026-03-05 20:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 20:09 [PATCH 1/2] bitbake-setup: ensure that relative local path given on 'init' command line is recorded as an absolute path Alexander Kanavin
2026-03-05 20:09 ` Alexander Kanavin [this message]
[not found] ` <189A0AE65037F048.1967085@lists.openembedded.org>
2026-03-08 14:16 ` [bitbake-devel] [PATCH 2/2] bitbake-setup: correctly determine latest revision in status/update when it is fixed to a commit id Alexander Kanavin
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=20260305200937.221484-2-alex.kanavin@gmail.com \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=bitbake-devel@lists.openembedded.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox