mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 12:32:15 +02:00
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:
committed by
Richard Purdie
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user