diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index ae87bbff03..c676baa131 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -79,23 +79,24 @@ python write_specfile() { | |||
79 | fd.write("AutoReqProv: no\n") | 79 | fd.write("AutoReqProv: no\n") |
80 | 80 | ||
81 | bb.build.exec_func("mapping_rename_hook", d) | 81 | bb.build.exec_func("mapping_rename_hook", d) |
82 | rdepends = bb.utils.explode_dep_versions(bb.data.getVar('RDEPENDS', d, True) or "") | 82 | |
83 | for dep in rdepends: | 83 | def write_dep_field(varname, outstring): |
84 | ver = rdepends[dep] | 84 | depends = bb.utils.explode_dep_versions(bb.data.getVar(varname, d, True) or "") |
85 | if dep and ver: | 85 | for dep in depends: |
86 | ver = ver.replace('-', '+') | 86 | ver = depends[dep] |
87 | fd.write("Requires: %s %s\n" % (dep, ver)) | 87 | if dep and ver: |
88 | elif dep: | 88 | if '-' in ver: |
89 | fd.write("Requires: %s\n" % (dep)) | 89 | subd = read_subpkgdata_dict(dep, d) |
90 | 90 | pv = subd['PV'] | |
91 | rdepends = bb.utils.explode_dep_versions(bb.data.getVar('RRECOMMENDS', d, True) or "") | 91 | reppv = pv.replace('-', '+') |
92 | for dep in rdepends: | 92 | ver = ver.replace(pv, reppv) |
93 | ver = rdepends[dep] | 93 | fd.write("%s: %s %s\n" % (outstring, dep, ver)) |
94 | if dep and ver: | 94 | elif dep: |
95 | ver = ver.replace('-', '+') | 95 | fd.write("%s: %s\n" % (outstring, dep)) |
96 | fd.write("Recommends: %s %s\n" % (dep, ver)) | 96 | |
97 | elif dep: | 97 | |
98 | fd.write("Recommends: %s\n" % (dep)) | 98 | write_dep_field('RDEPENDS', 'Requires') |
99 | write_dep_field('RRECOMMENDS', 'Recommends') | ||
99 | 100 | ||
100 | fd.write("Summary\t: .\n") | 101 | fd.write("Summary\t: .\n") |
101 | 102 | ||