summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bblayers/layerindex.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/bitbake/lib/bblayers/layerindex.py b/bitbake/lib/bblayers/layerindex.py
index 17dfc9874d..7936516209 100644
--- a/bitbake/lib/bblayers/layerindex.py
+++ b/bitbake/lib/bblayers/layerindex.py
@@ -159,12 +159,17 @@ class LayerIndexPlugin(ActionPlugin):
159 logger.plain(' recommended by: %s' % ' '.join(recommendedby)) 159 logger.plain(' recommended by: %s' % ' '.join(recommendedby))
160 160
161 if dependencies: 161 if dependencies:
162 fetchdir = self.tinfoil.config_data.getVar('BBLAYERS_FETCH_DIR') 162 if args.fetchdir:
163 if not fetchdir: 163 fetchdir = args.fetchdir
164 logger.error("Cannot get BBLAYERS_FETCH_DIR") 164 else:
165 return 1 165 fetchdir = self.tinfoil.config_data.getVar('BBLAYERS_FETCH_DIR')
166 if not fetchdir:
167 logger.error("Cannot get BBLAYERS_FETCH_DIR")
168 return 1
169
166 if not os.path.exists(fetchdir): 170 if not os.path.exists(fetchdir):
167 os.makedirs(fetchdir) 171 os.makedirs(fetchdir)
172
168 addlayers = [] 173 addlayers = []
169 174
170 for deplayerbranch in dependencies: 175 for deplayerbranch in dependencies:
@@ -206,6 +211,7 @@ class LayerIndexPlugin(ActionPlugin):
206""" 211"""
207 args.show_only = True 212 args.show_only = True
208 args.ignore = [] 213 args.ignore = []
214 args.fetchdir = ""
209 args.shallow = True 215 args.shallow = True
210 self.do_layerindex_fetch(args) 216 self.do_layerindex_fetch(args)
211 217
@@ -215,6 +221,7 @@ class LayerIndexPlugin(ActionPlugin):
215 parser_layerindex_fetch.add_argument('-b', '--branch', help='branch name to fetch') 221 parser_layerindex_fetch.add_argument('-b', '--branch', help='branch name to fetch')
216 parser_layerindex_fetch.add_argument('-s', '--shallow', help='do only shallow clones (--depth=1)', action='store_true') 222 parser_layerindex_fetch.add_argument('-s', '--shallow', help='do only shallow clones (--depth=1)', action='store_true')
217 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') 223 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')
224 parser_layerindex_fetch.add_argument('-f', '--fetchdir', help='directory to fetch the layer(s) into (will be created if it does not exist)')
218 parser_layerindex_fetch.add_argument('layername', nargs='+', help='layer to fetch') 225 parser_layerindex_fetch.add_argument('layername', nargs='+', help='layer to fetch')
219 226
220 parser_layerindex_show_depends = self.add_command(sp, 'layerindex-show-depends', self.do_layerindex_show_depends, parserecipes=False) 227 parser_layerindex_show_depends = self.add_command(sp, 'layerindex-show-depends', self.do_layerindex_show_depends, parserecipes=False)