From b7aa48ed94a5a2f02032a3251bb85263f9a5d096 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Wed, 4 Mar 2020 12:30:53 -0800 Subject: [PATCH] [tsmeta] Add timesys layer backfill. --- classes/tsmeta.bbclass | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/classes/tsmeta.bbclass b/classes/tsmeta.bbclass index a29c80b..a1ac632 100644 --- a/classes/tsmeta.bbclass +++ b/classes/tsmeta.bbclass @@ -735,14 +735,20 @@ def tsmeta_git_branch_info(d, path): def tsmeta_collect_layers(d): layer_dict = dict() bspdir = d.getVar('BSPDIR') + + def _layer_info(lpath): + ldict = tsmeta_git_branch_info(d, lpath) + ldict['path'] = os.path.relpath(lpath, bspdir) + return ldict + for lname in d.getVar('BBFILE_COLLECTIONS').split(): pattern = d.getVar('_'.join(['BBFILE_PATTERN', lname])) full_path = os.path.normpath(pattern.split('^')[-1]) - rel_path = os.path.relpath(full_path, bspdir) - layer_dict[lname] = { - 'path': rel_path, - } - layer_dict[lname].update(tsmeta_git_branch_info(d, full_path)) + layer_dict[lname] = _layer_info(full_path) + + if 'timesys' not in layer_dict: + meta_timesys_dir = d.getVar('VIGILES_LAYERDIR') + layer_dict['timesys'] = _layer_info(meta_timesys_dir) return layer_dict