Skip to content

Commit

Permalink
[tsmeta] Add timesys layer backfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
mochel-timesys committed Mar 10, 2020
1 parent cfd0951 commit b7aa48e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions classes/tsmeta.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b7aa48e

Please sign in to comment.