When archiving original source, insert the first 10
characters of srcrev, after stripping off any
AUTOINC+, into the filename for tarfiles created
from directories.
Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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()