@@ -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 ''
@@ -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
# Assume 'master' branch if not set
if scheme in ['git', 'gitsm'] and 'branch' not in params and 'nobranch' not in params:
params['branch'] = 'master'
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> --- 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(+)