From 60ee4a5f135a084051d75dc34ac8987c31703d80 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 1 Sep 2007 23:40:47 +0000 Subject: package_x.bbclass: Sync with poky preparing for individual package writing tasks --- classes/package_rpm.bbclass | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'classes/package_rpm.bbclass') diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass index 4955792916..bd4a0c2798 100644 --- a/classes/package_rpm.bbclass +++ b/classes/package_rpm.bbclass @@ -54,7 +54,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 +122,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 +131,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 -- cgit v1.2.3