Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 07/11] devtool: fix misleading error when srcrev is on no branch
Date: Tue, 24 Nov 2026 18:18:03 +0100	[thread overview]
Message-ID: <20261124171807.74394-8-jaipaul.cheernam@est.tech> (raw)
In-Reply-To: <20261124171807.74394-1-jaipaul.cheernam@est.tech>

If srcrev is only reachable from a tag, devtool wrongly reports it as
found on multiple branches. Report that no remote branch contains it.

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 scripts/lib/devtool/upgrade.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 6cec34d2d5..46fb1be5d5 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -241,6 +241,9 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
         srcsubdir_rel = params.get('destsuffix', 'git')
         if not srcbranch:
             check_branch, check_branch_err = __run('git branch -r --contains %s' % srcrev)
+            if not check_branch.strip():
+                # srcrev is not on any remote branch (e.g. it is only reachable from a tag)
+                raise DevtoolError('Revision %s was not found on any remote branch.\nIt may only be reachable through a tag' % srcrev)
             get_branch = [x.strip() for x in check_branch.splitlines()]
             # Remove HEAD reference point and drop remote prefix
             get_branch = [x.split('/', 1)[1] for x in get_branch if not x.startswith('origin/HEAD')]

  parent reply	other threads:[~2026-11-24 17:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 17:17 [PATCH 00/11] Upgrades on 24th November Jaipaul Cheernam
2026-11-24 17:17 ` [PATCH 01/11] fastfloat: upgrade 8.3.2 -> 8.4.0 Jaipaul Cheernam
2026-11-24 17:17 ` [PATCH 02/11] libconfig: upgrade 1.8.2 -> 1.8.3 Jaipaul Cheernam
2026-11-24 17:17 ` [PATCH 03/11] gtk4: upgrade 4.24.1 -> 4.24.2 Jaipaul Cheernam
2026-11-25 19:34   ` [OE-core] " Mathieu Dubois-Briand
2026-11-27 10:51   ` [PATCH v2] " Jaipaul Cheernam
2026-11-24 17:18 ` [PATCH 04/11] btrfs-tools: upgrade 7.1 -> 7.3 Jaipaul Cheernam
2026-11-24 17:18 ` [PATCH 05/11] zstd: upgrade 1.5.7 -> 1.6.0 Jaipaul Cheernam
2026-11-24 17:38   ` Patchtest results for " patchtest
2026-11-25  6:40   ` [OE-core] " Mathieu Dubois-Briand
2026-11-25  9:58   ` [PATCH v2] " Jaipaul Cheernam
2026-11-25 10:13     ` Jaipaul Cheernam
2026-11-24 17:18 ` [PATCH 06/11] ovmf: upgrade edk2-stable202605 -> edk2-stable202611 Jaipaul Cheernam
2026-11-26 11:34   ` Jaipaul Cheernam
2026-11-26 12:37     ` [OE-core] " Mathieu Dubois-Briand
2026-11-26 13:16       ` Jaipaul Cheernam
2026-11-24 17:18 ` Jaipaul Cheernam [this message]
2026-11-24 17:18 ` [PATCH 08/11] blueprint-compiler: upgrade 0.20.4 -> 0.22.2 Jaipaul Cheernam
2026-11-27  9:16   ` [OE-core] " Ross Burton
2026-11-24 17:18 ` [PATCH 09/11] man-db: Upgrade 2.13.1 -> 2.13.3 Jaipaul Cheernam
2026-11-24 17:18 ` [PATCH 10/11] rxvt-unicode: upgrade 9.31 -> 9.32 Jaipaul Cheernam
2026-11-24 17:18 ` [PATCH 11/11] nfs-utils: upgrade 3.1.1 -> 3.2.1 Jaipaul Cheernam

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=20261124171807.74394-8-jaipaul.cheernam@est.tech \
    --to=jaipaul.cheernam@est.tech \
    --cc=openembedded-core@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