archiver.bbclass: add revision to git tarfile name
When archiving original source, insert the first 10 characters of srcrev, after stripping off any AUTOINC+, into the filename for tarfiles created from directories. (From OE-Core rev: 36726049a6a452f85d7cc849d57ad6af05d6d3ea) Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
3a1b605992
commit
a9b080405e
|
@ -146,7 +146,12 @@ python do_ar_original() {
|
|||
fetch.unpack(tmpdir, (url,))
|
||||
|
||||
os.chdir(tmpdir)
|
||||
tarname = os.path.join(ar_outdir, basename + '.tar.gz')
|
||||
# We split on '+' to chuck any annoying AUTOINC+ in the revision.
|
||||
try:
|
||||
src_rev = bb.fetch2.get_srcrev(d).split('+')[-1][:10]
|
||||
except:
|
||||
src_rev = 'NOREV'
|
||||
tarname = os.path.join(ar_outdir, basename + '.' + src_rev + '.tar.gz')
|
||||
tar = tarfile.open(tarname, 'w:gz')
|
||||
tar.add('.')
|
||||
tar.close()
|
||||
|
|
Loading…
Reference in New Issue