summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/recipetool/create.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index a08352ee25..431a09dd60 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -399,6 +399,10 @@ def create_recipe(args):
399 if '<html' in f.read(100).lower(): 399 if '<html' in f.read(100).lower():
400 logger.error('Fetching "%s" returned a single HTML page - check the URL is correct and functional' % fetchuri) 400 logger.error('Fetching "%s" returned a single HTML page - check the URL is correct and functional' % fetchuri)
401 sys.exit(1) 401 sys.exit(1)
402 if os.path.exists(os.path.join(srctree, '.gitmodules')) and srcuri.startswith('git://'):
403 srcuri = 'gitsm://' + srcuri[6:]
404 logger.info('Fetching submodules...')
405 bb.process.run('git submodule update --init --recursive', cwd=srctree)
402 406
403 if is_package(fetchuri): 407 if is_package(fetchuri):
404 tmpfdir = tempfile.mkdtemp(prefix='recipetool-') 408 tmpfdir = tempfile.mkdtemp(prefix='recipetool-')
@@ -658,8 +662,11 @@ def create_recipe(args):
658 # devtool looks for this specific exit code, so don't change it 662 # devtool looks for this specific exit code, so don't change it
659 sys.exit(15) 663 sys.exit(15)
660 else: 664 else:
661 if srcuri and srcuri.startswith(('git://', 'hg://', 'svn://')): 665 if srcuri and srcuri.startswith(('gitsm://', 'git://', 'hg://', 'svn://')):
662 outfile = '%s_%s.bb' % (pn, srcuri.split(':', 1)[0]) 666 suffix = srcuri.split(':', 1)[0]
667 if suffix == 'gitsm':
668 suffix = 'git'
669 outfile = '%s_%s.bb' % (pn, suffix)
663 elif realpv: 670 elif realpv:
664 outfile = '%s_%s.bb' % (pn, realpv) 671 outfile = '%s_%s.bb' % (pn, realpv)
665 else: 672 else: