summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Slater <jslater@windriver.com>2014-08-26 10:29:31 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-27 12:12:30 +0100
commita9b080405e3bffc9be1a912499fc6a1183d96bf9 (patch)
treec514d4ccee3a44c7aedd1caf28eabad304d537f9
parent3a1b605992a23703ba9cb8a0a81f6c0bb32122d5 (diff)
downloadpoky-a9b080405e3bffc9be1a912499fc6a1183d96bf9.tar.gz
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>
-rw-r--r--meta/classes/archiver.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 35e541194c..058ba63437 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -146,7 +146,12 @@ python do_ar_original() {
146 fetch.unpack(tmpdir, (url,)) 146 fetch.unpack(tmpdir, (url,))
147 147
148 os.chdir(tmpdir) 148 os.chdir(tmpdir)
149 tarname = os.path.join(ar_outdir, basename + '.tar.gz') 149 # We split on '+' to chuck any annoying AUTOINC+ in the revision.
150 try:
151 src_rev = bb.fetch2.get_srcrev(d).split('+')[-1][:10]
152 except:
153 src_rev = 'NOREV'
154 tarname = os.path.join(ar_outdir, basename + '.' + src_rev + '.tar.gz')
150 tar = tarfile.open(tarname, 'w:gz') 155 tar = tarfile.open(tarname, 'w:gz')
151 tar.add('.') 156 tar.add('.')
152 tar.close() 157 tar.close()