[OE-core] [PATCH 5/9] recipetool: create: support git submodules

Ola x Nilsson ola.x.nilsson at axis.com
Wed Sep 7 06:23:15 UTC 2016


> From: openembedded-core-bounces at lists.openembedded.org
> [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf
> Of Paul Eggleton
> Sent: den 6 september 2016 12:03
> 
> Ensure we fetch submodules and set SRC_URI correctly when pointing to a
> git repository that contains submodules.
> 
> Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
> ---
>  scripts/lib/recipetool/create.py | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
> index a08352e..7cbd614 100644
> --- a/scripts/lib/recipetool/create.py
> +++ b/scripts/lib/recipetool/create.py
> @@ -399,6 +399,11 @@ def create_recipe(args):
>                      if '<html' in f.read(100).lower():
>                          logger.error('Fetching "%s" returned a single HTML page - check
> the URL is correct and functional' % fetchuri)
>                          sys.exit(1)
> +        if os.path.exists(os.path.join(srctree, '.gitmodules')) and
> srcuri.startswith('git://'):
> +            srcuri = 'gitsm://' + srcuri[6:]
> +            logger.info('Fetching submodules...')
> +            bb.process.run('git submodule init', cwd=srctree)
> +            bb.process.run('git submodule update', cwd=srctree)
> 

This is not how the gitsm fetcher does it.

git submodule update --init --recursive

will actually fetch all submodules recursively.

-- 
Ola Nilsson



More information about the Openembedded-core mailing list