diff options
author | Richard Purdie <richard@openedhand.com> | 2007-08-21 09:37:30 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-08-21 09:37:30 +0000 |
commit | 48fd37f5f9f2907d2c6f5d547e8471b232eadc90 (patch) | |
tree | 44b13b0d5d4381cce7cab8edd62fdd817d97ac6d /meta/classes/package_tar.bbclass | |
parent | 005bf0112ced82ef5e98de4854c0fa749e52d4d6 (diff) | |
download | poky-48fd37f5f9f2907d2c6f5d547e8471b232eadc90.tar.gz |
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.bbclass | 21 |
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 @@ | |||
1 | inherit package | 1 | inherit package |
2 | 2 | ||
3 | PACKAGE_EXTRA_DEPENDS += "tar-native" | ||
4 | |||
5 | PACKAGE_WRITE_FUNCS += "do_package_tar" | ||
6 | IMAGE_PKGTYPE ?= "tar" | 3 | IMAGE_PKGTYPE ?= "tar" |
7 | 4 | ||
8 | python package_tar_fn () { | 5 | python package_tar_fn () { |
@@ -78,7 +75,7 @@ python do_package_tar () { | |||
78 | bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata) | 75 | bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata) |
79 | 76 | ||
80 | bb.data.update_data(localdata) | 77 | bb.data.update_data(localdata) |
81 | # stuff | 78 | |
82 | root = bb.data.getVar('ROOT', localdata) | 79 | root = bb.data.getVar('ROOT', localdata) |
83 | bb.mkdirhier(root) | 80 | bb.mkdirhier(root) |
84 | basedir = os.path.dirname(root) | 81 | basedir = os.path.dirname(root) |
@@ -97,6 +94,18 @@ python do_package_tar () { | |||
97 | ret = os.system("tar -czvf %s %s" % (tarfn, '.')) | 94 | ret = os.system("tar -czvf %s %s" % (tarfn, '.')) |
98 | if ret != 0: | 95 | if ret != 0: |
99 | bb.error("Creation of tar %s failed." % tarfn) | 96 | bb.error("Creation of tar %s failed." % tarfn) |
100 | # end stuff | ||
101 | del localdata | ||
102 | } | 97 | } |
98 | |||
99 | python () { | ||
100 | import bb | ||
101 | if bb.data.getVar('PACKAGES', d, True) != '': | ||
102 | bb.data.setVarFlag('do_package_write_tar', 'depends', 'tar-native:do_populate_staging', d) | ||
103 | } | ||
104 | |||
105 | |||
106 | python do_package_write_tar () { | ||
107 | bb.build.exec_func("read_subpackage_metadata", d) | ||
108 | bb.build.exec_func("do_package_tar", d) | ||
109 | } | ||
110 | do_package_write_tar[dirs] = "${D}" | ||
111 | addtask package_write_tar before do_build after do_package | ||