summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hatle <mhatle@windriver.com>2010-08-23 08:12:43 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-23 21:04:20 +0100
commit9a8b6447c60908b9e603aa51da7328b52460f53a (patch)
treeba07b2679f3f7c76237e53bf29e9fbd4e3d7e19c
parent59a3e98b044d3157e7472d35b1439a4a292c6693 (diff)
downloadopenembedded-core-9a8b6447c60908b9e603aa51da7328b52460f53a.tar.gz
openembedded-core-9a8b6447c60908b9e603aa51da7328b52460f53a.tar.bz2
openembedded-core-9a8b6447c60908b9e603aa51da7328b52460f53a.zip
package_rpm: Temporary workaround for perfile dependencies
Until the pseudo code is fully integrated, we need to roll up the per file dependencies into package dependencies for rpm. Signed-off-by: Mark Hatle <mhatle@windriver.com>
-rw-r--r--meta/classes/package_rpm.bbclass18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index f89fd94728..311c0a8883 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -187,6 +187,24 @@ python write_specfile () {
splitsection = (bb.data.getVar('SECTION', localdata, True) or "")
splitdescription = (bb.data.getVar('DESCRIPTION', localdata, True) or "")
+ # Roll up the per file dependencies into package level dependencies
+ def roll_filerdeps(varname, d):
+ depends = bb.utils.explode_dep_versions(bb.data.getVar(varname, d, True) or "")
+ dependsflist_key = 'FILE' + varname + 'FLIST'
+ dependsflist = (bb.data.getVar(dependsflist_key, d, True) or "")
+ for dfile in dependsflist.split():
+ key = "FILE" + varname + "_" + dfile
+ filedepends = bb.utils.explode_dep_versions(bb.data.getVar(key, d, True) or "")
+ bb.utils.extend_deps(depends, filedepends)
+ bb.data.setVar(varname, bb.utils.join_deps(depends), d)
+
+ roll_filerdeps('RDEPENDS', localdata)
+ roll_filerdeps('RRECOMMENDS', localdata)
+ roll_filerdeps('RSUGGESTS', localdata)
+ roll_filerdeps('RPROVIDES', localdata)
+ roll_filerdeps('RREPLACES', localdata)
+ roll_filerdeps('RCONFLICTS', localdata)
+
translate_vers('RDEPENDS', localdata)
translate_vers('RRECOMMENDS', localdata)
translate_vers('RSUGGESTS', localdata)