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>
This commit is contained in:
parent
2758fce801
commit
63645af528
|
@ -1079,8 +1079,13 @@ python do_package_rpm () {
|
|||
return
|
||||
|
||||
# Construct the spec file...
|
||||
# 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.
|
||||
srcname = strip_multilib(d.getVar('PN', True), d)
|
||||
outspecfile = workdir + "/" + srcname + ".spec"
|
||||
if os.path.isfile(outspecfile):
|
||||
os.remove(outspecfile)
|
||||
d.setVar('OUTSPECFILE', outspecfile)
|
||||
bb.build.exec_func('write_specfile', d)
|
||||
|
||||
|
|
Loading…
Reference in New Issue