summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.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_rpm.bbclass
parent005bf0112ced82ef5e98de4854c0fa749e52d4d6 (diff)
downloadpoky-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_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass18
1 files changed, 15 insertions, 3 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 4955792916..7fc5e8ea96 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -2,7 +2,6 @@ inherit package
2inherit rpm_core 2inherit rpm_core
3 3
4RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}" 4RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}"
5PACKAGE_WRITE_FUNCS += "do_package_rpm"
6IMAGE_PKGTYPE ?= "rpm" 5IMAGE_PKGTYPE ?= "rpm"
7 6
8python write_specfile() { 7python write_specfile() {
@@ -54,7 +53,6 @@ python write_specfile() {
54 except OSError: 53 except OSError:
55 raise bb.build.FuncFailed("unable to open spec file for writing.") 54 raise bb.build.FuncFailed("unable to open spec file for writing.")
56 55
57# fd = sys.__stdout__
58 fd = specfile 56 fd = specfile
59 for var in out_vartranslate.keys(): 57 for var in out_vartranslate.keys():
60 if out_vartranslate[var][0] == "%": 58 if out_vartranslate[var][0] == "%":
@@ -123,7 +121,7 @@ python do_package_rpm () {
123 bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata) 121 bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata)
124 122
125 bb.data.update_data(localdata) 123 bb.data.update_data(localdata)
126# stuff 124
127 root = bb.data.getVar('ROOT', localdata) 125 root = bb.data.getVar('ROOT', localdata)
128 basedir = os.path.dirname(root) 126 basedir = os.path.dirname(root)
129 pkgoutdir = outdir 127 pkgoutdir = outdir
@@ -132,3 +130,17 @@ python do_package_rpm () {
132 bb.build.exec_func('write_specfile', localdata) 130 bb.build.exec_func('write_specfile', localdata)
133 del localdata 131 del localdata
134} 132}
133
134python () {
135 import bb
136 if bb.data.getVar('PACKAGES', d, True) != '':
137 bb.data.setVarFlag('do_package_write_rpm', 'depends', 'rpm-native:do_populate_staging', d)
138}
139
140
141python do_package_write_rpm () {
142 bb.build.exec_func("read_subpackage_metadata", d)
143 bb.build.exec_func("do_package_rpm", d)
144}
145do_package_write_rpm[dirs] = "${D}"
146addtask package_write_rpm before do_build after do_package