summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-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 f89fd9472..311c0a888 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)