package_rpm: Set _tmppath to avoid races over tmp files

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.

(From OE-Core rev: b2ef543284c8c8d0d3badb2e1bcadad1106982d2)

(From OE-Core rev: 018442ed2cd251f85212dfa1d03c0b24a0750bfa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-11-16 16:59:29 +00:00
parent 7705d9a8cc
commit f99f36f637
1 changed files with 1 additions and 0 deletions

View 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!