Skip to content

Commit

Permalink
lkft-metadata.bbclass: add PV and SRCREV to metadata
Browse files Browse the repository at this point in the history
* rename srcuri0 to metadata
* add PV and SRCREV to metadata

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
  • Loading branch information
fboudra committed Sep 6, 2017
1 parent 13658ed commit 1f7cc7f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions classes/lkft-metadata.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ python write_srcuri() {
with open(os.path.join(pkghistdir, 'srcuri'), 'w') as f:
f.write('%s' % srcuri)
pn = d.getVar('PN', True).upper().replace('-', '_')
with open(os.path.join(pkghistdir, 'srcuri0'), 'w') as f:
f.write('%s_URL=%s' % (pn, srcuri.splitlines()[0].split(';')[0]))
pv = d.getVar('PV', True)
srcrev = d.getVar('SRCREV', True)
with open(os.path.join(pkghistdir, 'metadata'), 'w') as f:
f.write('%s_URL=%s\n' % (pn, srcuri.splitlines()[0].split(';')[0]))
f.write('%s_VERSION=%s\n' % (pn, pv))
f.write('%s_REVISION=%s\n' % (pn, srcrev))
}

0 comments on commit 1f7cc7f

Please sign in to comment.