From: "Paul Barker" <paul@pbarker.dev>
To: "Babanpreet Singh" <bbnpreetsingh@gmail.com>,
<openembedded-core@lists.openembedded.org>
Cc: "Ross Burton" <ross.burton@arm.com>
Subject: Re: [PATCH 2/2] recipetool: create: fix git URLs that only specify a tag
Date: Mon, 23 Nov 2026 09:30:58 +0000 [thread overview]
Message-ID: <DN2HHOGYJB3B.1EWTJOMA10ROH@pbarker.dev> (raw)
In-Reply-To: <20261112035834.7-2-bbnpreetsingh@gmail.com>
On Thu Nov 12, 2026 at 3:58 AM GMT, Babanpreet Singh wrote:
> A git URL with tag= and no branch= fails with:
>
> Unable to resolve '' in upstream git repository
>
> AUTOREV has no branch to follow now that bitbake no longer defaults to
> master. Fetch the tag itself, which also lets the branch be found from
> it.
>
> AI-Generated: Uses Claude (claude-fable-5-2)
> Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
Hi,
The explanation in the commit message doesn't really make sense. The
issue with the test recipe created for matchbox-keyboard is that the
commit tagged as "0.1.1" isn't present on the default branch. This is
not true for all git URLs with "tag=..." and no "branch=...".
> ---
>
> Notes:
> Tested with oe-selftest -r recipetool.RecipetoolCreateTests. Not tried
> on wrynose, which has the same code.
>
> meta/lib/oeqa/selftest/cases/recipetool.py | 7 +++++++
> scripts/lib/recipetool/create.py | 4 ++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
> index c278abdab2..804efcc755 100644
> --- a/meta/lib/oeqa/selftest/cases/recipetool.py
> +++ b/meta/lib/oeqa/selftest/cases/recipetool.py
> @@ -811,6 +811,13 @@ class RecipetoolCreateTests(RecipetoolBase):
> self._test_recipetool_create_git('git://git.yoctoproject.org/matchbox-keyboard;branch=matchbox-keyboard-0-1;protocol=https;tag=0.1.1',
> extravars={'SRCREV': '630d89068dc0a1e9199306d405cb32f892dfa4d3'})
>
> + def test_recipetool_create_git_srcuri_tag(self):
> + # The 0.1.1 tag is only on the matchbox-keyboard-0-1 branch
> + srcuri = 'git://git.yoctoproject.org/matchbox-keyboard;protocol=https;tag=0.1.1'
> + self._test_recipetool_create_git(srcuri,
> + extravars={'SRC_URI': srcuri + ';branch=matchbox-keyboard-0-1',
> + 'SRCREV': '630d89068dc0a1e9199306d405cb32f892dfa4d3'})
> +
> def _go_urifiy(self, url, version, modulepath = None, pathmajor = None, subdir = None):
> modulepath = ",path='%s'" % modulepath if len(modulepath) else ''
> pathmajor = ",pathmajor='%s'" % pathmajor if len(pathmajor) else ''
> diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
> index 662e7a6232..0e73f462d3 100644
> --- a/scripts/lib/recipetool/create.py
> +++ b/scripts/lib/recipetool/create.py
> @@ -520,6 +520,10 @@ def create_recipe(args):
> storeTagName = params['tag']
> params['nobranch'] = '1'
> del params['tag']
> + if srcrev == '${AUTOREV}':
> + # Nothing for ${AUTOREV} to resolve without a branch, so
> + # fetch the tag itself
> + srcrev = storeTagName
There is no situation where we are "without a branch". As the following
comment says, we assume we're on the "master" branch if the branch is
not specified.
> # Assume 'master' branch if not set
> if scheme in ['git', 'gitsm'] and 'branch' not in params and 'nobranch' not in params:
> params['branch'] = 'master'
Best regards,
--
Paul Barker
next prev parent reply other threads:[~2026-11-23 9:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 3:58 [PATCH 1/2] recipetool: create: keep tag= in SRC_URI Babanpreet Singh
2026-11-12 3:58 ` [PATCH 2/2] recipetool: create: fix git URLs that only specify a tag Babanpreet Singh
2026-11-23 9:30 ` Paul Barker [this message]
2026-11-25 3:04 ` Babanpreet Singh
2026-12-01 18:18 ` [PATCH v2] " Babanpreet Singh
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=DN2HHOGYJB3B.1EWTJOMA10ROH@pbarker.dev \
--to=paul@pbarker.dev \
--cc=bbnpreetsingh@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox