summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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