summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-08-25 20:50:46 +0000
committerRichard Purdie <richard@openedhand.com>2008-08-25 20:50:46 +0000
commit317a8473c9101e967fd1693dbc36b8d56aaddf34 (patch)
tree0690a5c9b95ef3bd2278605e00377eba8992f69b /meta
parentbae5aaf0d000120193ec42a5b3d9209fa98eea2c (diff)
downloadopenembedded-core-317a8473c9101e967fd1693dbc36b8d56aaddf34.tar.gz
openembedded-core-317a8473c9101e967fd1693dbc36b8d56aaddf34.tar.bz2
openembedded-core-317a8473c9101e967fd1693dbc36b8d56aaddf34.zip
package_rpm.bbclass: Fix empty package handling, handle package dependency renaming by adding a missing function call and expand RPMBUILD before changing the dictonary so local PV/PR changes don't break the WORKDIR variable expansion
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5100 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package_rpm.bbclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ac6ac2ca54..db379b4c96 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -46,7 +46,8 @@ python write_specfile() {
del files[files.index(r)]
except ValueError:
pass
- if not files:
+
+ if not files and bb.data.getVar('ALLOW_EMPTY', d) != "1":
from bb import note
note("Not creating empty archive for %s-%s-%s" % (bb.data.getVar('PKG',d, 1), bb.data.getVar('PV', d, 1), bb.data.getVar('PR', d, 1)))
return
@@ -65,10 +66,10 @@ python write_specfile() {
if out_vartranslate[var][0] == "%":
continue
val = bb.data.getVar(var, d, 1)
- if var == "RDEPENDS":
- val = val.split()[0]
fd.write("%s\t: %s\n" % (out_vartranslate[var], val))
- rdepends = " ".join(bb.utils.explode_deps(bb.data.getVar('RDEPENDS', d, True)))
+
+ bb.build.exec_func("mapping_rename_hook", d)
+ rdepends = " ".join(bb.utils.explode_deps(bb.data.getVar('RDEPENDS', d, True) or ""))
if rdepends:
fd.write("Requires: %s\n" % rdepends)
fd.write("Summary\t: .\n")
@@ -160,6 +161,9 @@ python do_package_rpm () {
pkgoutdir = outdir
bb.mkdirhier(pkgoutdir)
bb.data.setVar('OUTSPECFILE', os.path.join(workdir, "%s.spec" % pkg), localdata)
+ # Save the value of RPMBUILD expanded into the new dictonary so any
+ # changes in the compoents that make up workdir don't break packaging
+ bb.data.setVar('RPMBUILD', bb.data.getVar("RPMBUILD", d, True), localdata)
bb.build.exec_func('write_specfile', localdata)
bb.utils.unlockfile(lf)
}