summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/archiver.bbclass8
1 files changed, 2 insertions, 6 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 9239983e8f..3543ca9c58 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -125,7 +125,7 @@ python () {
125# (e.g. git repositories) is "unpacked" and then put into a tarball. 125# (e.g. git repositories) is "unpacked" and then put into a tarball.
126python do_ar_original() { 126python do_ar_original() {
127 127
128 import shutil, tarfile, tempfile 128 import shutil, tempfile
129 129
130 if d.getVarFlag('ARCHIVER_MODE', 'src', True) != "original": 130 if d.getVarFlag('ARCHIVER_MODE', 'src', True) != "original":
131 return 131 return
@@ -261,13 +261,9 @@ def create_tarball(d, srcdir, suffix, ar_outdir):
261 filename = '%s.tar.gz' % d.getVar('PF', True) 261 filename = '%s.tar.gz' % d.getVar('PF', True)
262 tarname = os.path.join(ar_outdir, filename) 262 tarname = os.path.join(ar_outdir, filename)
263 263
264 srcdir = srcdir.rstrip('/')
265 dirname = os.path.dirname(srcdir)
266 basename = os.path.basename(srcdir)
267 os.chdir(dirname)
268 bb.note('Creating %s' % tarname) 264 bb.note('Creating %s' % tarname)
269 tar = tarfile.open(tarname, 'w:gz') 265 tar = tarfile.open(tarname, 'w:gz')
270 tar.add(basename) 266 tar.add(srcdir, arcname=os.path.basename(srcdir))
271 tar.close() 267 tar.close()
272 268
273# creating .diff.gz between source.orig and source 269# creating .diff.gz between source.orig and source