summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/archiver.bbclass10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index abaef87fc0..0a9fe4fd1d 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -275,6 +275,14 @@ python do_ar_configured() {
275 create_tarball(d, srcdir, 'configured', ar_outdir) 275 create_tarball(d, srcdir, 'configured', ar_outdir)
276} 276}
277 277
278def exclude_useless_paths(tarinfo):
279 if tarinfo.isdir():
280 if tarinfo.name.endswith('/temp') or tarinfo.name.endswith('/patches') or tarinfo.name.endswith('/.pc'):
281 return None
282 elif tarinfo.name == 'temp' or tarinfo.name == 'patches' or tarinfo.name == '.pc':
283 return None
284 return tarinfo
285
278def create_tarball(d, srcdir, suffix, ar_outdir): 286def create_tarball(d, srcdir, suffix, ar_outdir):
279 """ 287 """
280 create the tarball from srcdir 288 create the tarball from srcdir
@@ -299,7 +307,7 @@ def create_tarball(d, srcdir, suffix, ar_outdir):
299 307
300 bb.note('Creating %s' % tarname) 308 bb.note('Creating %s' % tarname)
301 tar = tarfile.open(tarname, 'w:gz') 309 tar = tarfile.open(tarname, 'w:gz')
302 tar.add(srcdir, arcname=os.path.basename(srcdir)) 310 tar.add(srcdir, arcname=os.path.basename(srcdir), filter=exclude_useless_paths)
303 tar.close() 311 tar.close()
304 312
305# creating .diff.gz between source.orig and source 313# creating .diff.gz between source.orig and source