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_rpm.bbclass | |
parent | 005bf0112ced82ef5e98de4854c0fa749e52d4d6 (diff) | |
download | openembedded-core-48fd37f5f9f2907d2c6f5d547e8471b232eadc90.tar.gz openembedded-core-48fd37f5f9f2907d2c6f5d547e8471b232eadc90.tar.bz2 openembedded-core-48fd37f5f9f2907d2c6f5d547e8471b232eadc90.tar.xz 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_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 495579291..7fc5e8ea9 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -2,7 +2,6 @@ inherit package inherit rpm_core RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}" -PACKAGE_WRITE_FUNCS += "do_package_rpm" IMAGE_PKGTYPE ?= "rpm" python write_specfile() { @@ -54,7 +53,6 @@ python write_specfile() { except OSError: raise bb.build.FuncFailed("unable to open spec file for writing.") -# fd = sys.__stdout__ fd = specfile for var in out_vartranslate.keys(): if out_vartranslate[var][0] == "%": @@ -123,7 +121,7 @@ python do_package_rpm () { bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata) bb.data.update_data(localdata) -# stuff + root = bb.data.getVar('ROOT', localdata) basedir = os.path.dirname(root) pkgoutdir = outdir @@ -132,3 +130,17 @@ python do_package_rpm () { bb.build.exec_func('write_specfile', localdata) del localdata } + +python () { + import bb + if bb.data.getVar('PACKAGES', d, True) != '': + bb.data.setVarFlag('do_package_write_rpm', 'depends', 'rpm-native:do_populate_staging', d) +} + + +python do_package_write_rpm () { + bb.build.exec_func("read_subpackage_metadata", d) + bb.build.exec_func("do_package_rpm", d) +} +do_package_write_rpm[dirs] = "${D}" +addtask package_write_rpm before do_build after do_package |