From: Babanpreet Singh <bbnpreetsingh@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Ross Burton <ross.burton@arm.com>,
Babanpreet Singh <bbnpreetsingh@gmail.com>
Subject: [PATCH 1/2] recipetool: create: keep tag= in SRC_URI
Date: Thu, 12 Nov 2026 03:58:33 +0000 [thread overview]
Message-ID: <20261112035834.7-1-bbnpreetsingh@gmail.com> (raw)
The fetcher now checks that tag= resolves to SRCREV, so stop dropping
the tag from the SRC_URI of the recipe.
[YOCTO #15816]
Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
---
meta/lib/oeqa/selftest/cases/recipetool.py | 7 ++++++-
scripts/lib/recipetool/create.py | 2 --
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index 54b7cb3a65..c278abdab2 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -776,7 +776,7 @@ class RecipetoolCreateTests(RecipetoolBase):
inherits = ['setuptools3']
self._test_recipe_contents(recipefile, checkvars, inherits)
- def _test_recipetool_create_git(self, srcuri, branch=None):
+ def _test_recipetool_create_git(self, srcuri, branch=None, extravars=None):
# Basic test to check http git URL mangling works
temprecipe = os.path.join(self.tempdir, 'recipe')
os.makedirs(temprecipe)
@@ -792,6 +792,7 @@ class RecipetoolCreateTests(RecipetoolBase):
checkvars['SRC_URI'] = 'git%s;protocol=%s' % (srcuri[len(scheme):], scheme)
if ';branch=' not in srcuri:
checkvars['SRC_URI'] += ';branch=' + (branch or 'master')
+ checkvars.update(extravars or {})
self._test_recipe_contents(recipefile, checkvars, [])
def test_recipetool_create_git_http(self):
@@ -806,6 +807,10 @@ class RecipetoolCreateTests(RecipetoolBase):
def test_recipetool_create_git_srcbranch(self):
self._test_recipetool_create_git('git://git.yoctoproject.org/matchbox-keyboard;protocol=https', 'matchbox-keyboard-0-1')
+ def test_recipetool_create_git_srcuri_branch_tag(self):
+ 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 _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 e0da96dea0..662e7a6232 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -600,8 +600,6 @@ def create_recipe(args):
logger.error(str(err))
logger.error("Possibly wrong tag name is provided")
sys.exit(1)
- # Drop tag from srcuri as it will have conflicts with SRCREV during recipe parse.
- del params['tag']
srcuri = bb.fetch.encodeurl((scheme, network, path, user, passwd, params))
if os.path.exists(os.path.join(srctree, '.gitmodules')) and srcuri.startswith('git://'):
--
2.43.0
next reply other threads:[~2026-11-12 3:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 3:58 Babanpreet Singh [this message]
2026-11-12 3:58 ` [PATCH 2/2] recipetool: create: fix git URLs that only specify a tag 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=20261112035834.7-1-bbnpreetsingh@gmail.com \
--to=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 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.