summaryrefslogtreecommitdiff
path: root/meta/classes/package_tar.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-08-21 09:37:30 +0000
committerRichard Purdie <richard@openedhand.com>2007-08-21 09:37:30 +0000
commit48fd37f5f9f2907d2c6f5d547e8471b232eadc90 (patch)
tree44b13b0d5d4381cce7cab8edd62fdd817d97ac6d /meta/classes/package_tar.bbclass
parent005bf0112ced82ef5e98de4854c0fa749e52d4d6 (diff)
downloadopenembedded-core-48fd37f5f9f2907d2c6f5d547e8471b232eadc90.tar.gz
openembedded-core-48fd37f5f9f2907d2c6f5d547e8471b232eadc90.tar.bz2
openembedded-core-48fd37f5f9f2907d2c6f5d547e8471b232eadc90.zip
packaging: Split deb and ipk creation into separate tasks so changing the packaging type means the new type of packages are automatically generated.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2526 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/package_tar.bbclass')
-rw-r--r--meta/classes/package_tar.bbclass21
1 files changed, 15 insertions, 6 deletions
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass
index 17216a86f4..cb4c42b261 100644
--- a/meta/classes/package_tar.bbclass
+++ b/meta/classes/package_tar.bbclass
@@ -1,8 +1,5 @@
inherit package
-PACKAGE_EXTRA_DEPENDS += "tar-native"
-
-PACKAGE_WRITE_FUNCS += "do_package_tar"
IMAGE_PKGTYPE ?= "tar"
python package_tar_fn () {
@@ -78,7 +75,7 @@ python do_package_tar () {
bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata)
bb.data.update_data(localdata)
-# stuff
+
root = bb.data.getVar('ROOT', localdata)
bb.mkdirhier(root)
basedir = os.path.dirname(root)
@@ -97,6 +94,18 @@ python do_package_tar () {
ret = os.system("tar -czvf %s %s" % (tarfn, '.'))
if ret != 0:
bb.error("Creation of tar %s failed." % tarfn)
-# end stuff
- del localdata
}
+
+python () {
+ import bb
+ if bb.data.getVar('PACKAGES', d, True) != '':
+ bb.data.setVarFlag('do_package_write_tar', 'depends', 'tar-native:do_populate_staging', d)
+}
+
+
+python do_package_write_tar () {
+ bb.build.exec_func("read_subpackage_metadata", d)
+ bb.build.exec_func("do_package_tar", d)
+}
+do_package_write_tar[dirs] = "${D}"
+addtask package_write_tar before do_build after do_package