summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorBian Naimeng <biannm@cn.fujitsu.com>2013-07-09 08:27:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-13 18:23:33 +0100
commit63645af528efe5db5e8d96f1012177abd6a324a5 (patch)
tree102a5400c11f8d9f0d1f69c8963d8474bc2bfb5c /meta/classes
parent2758fce80196bcf2e4ae13edc188fe7e16e937fd (diff)
downloadpoky-63645af528efe5db5e8d96f1012177abd6a324a5.tar.gz
package_rpm.bbclass: remove xx.spec before doing rpmbuild xx.src.rpm
If the spec file already exist, and has not been stored into pseudo's files.db, it maybe cause rpmbuild src.rpm fail, so remove it before doing rpmbuild src.rpm. (From OE-Core rev: 760af902a98b350a2f1f3203fa0096965924a83d) Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_rpm.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index fa928ce042..1537079bb0 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -1079,8 +1079,13 @@ python do_package_rpm () {
1079 return 1079 return
1080 1080
1081 # Construct the spec file... 1081 # Construct the spec file...
1082 # If the spec file already exist, and has not been stored into
1083 # pseudo's files.db, it maybe cause rpmbuild src.rpm fail,
1084 # so remove it before doing rpmbuild src.rpm.
1082 srcname = strip_multilib(d.getVar('PN', True), d) 1085 srcname = strip_multilib(d.getVar('PN', True), d)
1083 outspecfile = workdir + "/" + srcname + ".spec" 1086 outspecfile = workdir + "/" + srcname + ".spec"
1087 if os.path.isfile(outspecfile):
1088 os.remove(outspecfile)
1084 d.setVar('OUTSPECFILE', outspecfile) 1089 d.setVar('OUTSPECFILE', outspecfile)
1085 bb.build.exec_func('write_specfile', d) 1090 bb.build.exec_func('write_specfile', d)
1086 1091