summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_tar.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-02-24 16:05:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-25 08:01:09 +0000
commitae1265809503494f4c5da21c8335cedc3569ba62 (patch)
tree6a8f4a61bca413cc2db79e37f4f3c87f0730fd07 /meta/classes/package_tar.bbclass
parentd7eb0f5731436bb13f8aacac71527c0372069fb6 (diff)
downloadpoky-ae1265809503494f4c5da21c8335cedc3569ba62.tar.gz
classes/package_tar: fix conflicts with package_deb / package_ipk
Avoid tar noticing that the directory is changing when do_package_write_deb or do_package_write_ipk are running at the same time as do_package_write_tar (because DEBIAN and CONTROL are being added and removed while tar is running so the directory changes). Fixes [YOCTO #5652] (From OE-Core rev: d000761acdb2645ac879d8d9d6b022770545f644) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_tar.bbclass')
-rw-r--r--meta/classes/package_tar.bbclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass
index 2d6fc8fe21..fed2c28b69 100644
--- a/meta/classes/package_tar.bbclass
+++ b/meta/classes/package_tar.bbclass
@@ -41,11 +41,12 @@ python do_package_tar () {
41 basedir = os.path.dirname(root) 41 basedir = os.path.dirname(root)
42 tarfn = localdata.expand("${DEPLOY_DIR_TAR}/${PKG}-${PKGV}-${PKGR}.tar.gz") 42 tarfn = localdata.expand("${DEPLOY_DIR_TAR}/${PKG}-${PKGV}-${PKGR}.tar.gz")
43 os.chdir(root) 43 os.chdir(root)
44 from glob import glob 44 dlist = os.listdir(root)
45 if not glob('*'): 45 if not dlist:
46 bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True))) 46 bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
47 continue 47 continue
48 ret = subprocess.call("tar -czf %s %s" % (tarfn, '.'), shell=True) 48 args = "tar -cz --exclude=CONTROL --exclude=DEBIAN -f".split()
49 ret = subprocess.call(args + [tarfn] + dlist)
49 if ret != 0: 50 if ret != 0:
50 bb.error("Creation of tar %s failed." % tarfn) 51 bb.error("Creation of tar %s failed." % tarfn)
51} 52}