mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
bitbake: layerindex: Add --fetchdir parameter to layerindex-fetch
Introduce --fetchdir parameter to layerindex-fetch enabling users to choose the directory to fetch the layers different from BBLAYERS_FETCH_DIR. [YOCTO #14347] (Bitbake rev: 784a904faffac723ddf58ba765b9dd11ac068de5) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
9fae310dd2
commit
cda69e0166
@@ -159,12 +159,17 @@ class LayerIndexPlugin(ActionPlugin):
|
|||||||
logger.plain(' recommended by: %s' % ' '.join(recommendedby))
|
logger.plain(' recommended by: %s' % ' '.join(recommendedby))
|
||||||
|
|
||||||
if dependencies:
|
if dependencies:
|
||||||
fetchdir = self.tinfoil.config_data.getVar('BBLAYERS_FETCH_DIR')
|
if args.fetchdir:
|
||||||
if not fetchdir:
|
fetchdir = args.fetchdir
|
||||||
logger.error("Cannot get BBLAYERS_FETCH_DIR")
|
else:
|
||||||
return 1
|
fetchdir = self.tinfoil.config_data.getVar('BBLAYERS_FETCH_DIR')
|
||||||
|
if not fetchdir:
|
||||||
|
logger.error("Cannot get BBLAYERS_FETCH_DIR")
|
||||||
|
return 1
|
||||||
|
|
||||||
if not os.path.exists(fetchdir):
|
if not os.path.exists(fetchdir):
|
||||||
os.makedirs(fetchdir)
|
os.makedirs(fetchdir)
|
||||||
|
|
||||||
addlayers = []
|
addlayers = []
|
||||||
|
|
||||||
for deplayerbranch in dependencies:
|
for deplayerbranch in dependencies:
|
||||||
@@ -206,6 +211,7 @@ class LayerIndexPlugin(ActionPlugin):
|
|||||||
"""
|
"""
|
||||||
args.show_only = True
|
args.show_only = True
|
||||||
args.ignore = []
|
args.ignore = []
|
||||||
|
args.fetchdir = ""
|
||||||
args.shallow = True
|
args.shallow = True
|
||||||
self.do_layerindex_fetch(args)
|
self.do_layerindex_fetch(args)
|
||||||
|
|
||||||
@@ -215,6 +221,7 @@ class LayerIndexPlugin(ActionPlugin):
|
|||||||
parser_layerindex_fetch.add_argument('-b', '--branch', help='branch name to fetch')
|
parser_layerindex_fetch.add_argument('-b', '--branch', help='branch name to fetch')
|
||||||
parser_layerindex_fetch.add_argument('-s', '--shallow', help='do only shallow clones (--depth=1)', action='store_true')
|
parser_layerindex_fetch.add_argument('-s', '--shallow', help='do only shallow clones (--depth=1)', action='store_true')
|
||||||
parser_layerindex_fetch.add_argument('-i', '--ignore', help='assume the specified layers do not need to be fetched/added (separate multiple layers with commas, no spaces)', metavar='LAYER')
|
parser_layerindex_fetch.add_argument('-i', '--ignore', help='assume the specified layers do not need to be fetched/added (separate multiple layers with commas, no spaces)', metavar='LAYER')
|
||||||
|
parser_layerindex_fetch.add_argument('-f', '--fetchdir', help='directory to fetch the layer(s) into (will be created if it does not exist)')
|
||||||
parser_layerindex_fetch.add_argument('layername', nargs='+', help='layer to fetch')
|
parser_layerindex_fetch.add_argument('layername', nargs='+', help='layer to fetch')
|
||||||
|
|
||||||
parser_layerindex_show_depends = self.add_command(sp, 'layerindex-show-depends', self.do_layerindex_show_depends, parserecipes=False)
|
parser_layerindex_show_depends = self.add_command(sp, 'layerindex-show-depends', self.do_layerindex_show_depends, parserecipes=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user