[OE-core] [PATCH 0/1]package_rpm.bbclass: remove xx.spec before doing rpmbuild xx.src.rpm
Bian Naimeng
biannm at cn.fujitsu.com
Wed Jul 10 02:56:45 UTC 2013
Hi all
Sorry, it looks like i should post this patch to poky. please ignore this
Thanks
Bian
said the following on 2013-7-9 16:27:, Bian Naimeng wrote:
> 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.
>
> Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
>
> ---
> meta/classes/package_rpm.bbclass | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index c654cdb..217ddcb 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -1069,8 +1069,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)
More information about the Openembedded-core
mailing list