]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm: Set _tmppath to avoid races over tmp files
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Nov 2011 16:59:29 +0000 (16:59 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Nov 2011 10:46:27 +0000 (10:46 +0000)
Occasionally we keep seeing "unable to open temp file" messages during
do_package_write_rpm tasks. This appears to happen when multiple
processes are writing rpm files and is likely due to using the
shared system temp directory. This patch changes the tmp path
to the package work directory meaning conflicts should become
a non-issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass

index 2ace0537aca265b512d49b15c23b7602546a2520..75e4f2d196535486f356a52ebae46a73e0a5f13f 100644 (file)
@@ -955,6 +955,7 @@ python do_package_rpm () {
        cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
        cmd = cmd + " --define 'debug_package %{nil}'"
        cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
+       cmd = cmd + " --define '_tmppath " + workdir + "'"
        cmd = cmd + " -bb " + outspecfile
 
        # Build the rpm package!