]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm: set _builddir to B not S
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 27 Mar 2018 09:56:06 +0000 (10:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 29 Mar 2018 23:28:47 +0000 (00:28 +0100)
Recipes which use a shared workdir (e.g. gcc-runtine and libgcc) can
race over temporary files causing interesting build failures.

Using B instead of S avoids this problem.

[YOCTO #12605]

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

index af64ef62c58a9b85d5f4f888208f016158ddd25c..21ada348aaa372ffac70b3461dc680ff103000b5 100644 (file)
@@ -670,7 +670,7 @@ python do_package_rpm () {
     cmd = rpmbuild
     cmd = cmd + " --noclean --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
     cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
-    cmd = cmd + " --define '_builddir " + d.getVar('S') + "'"
+    cmd = cmd + " --define '_builddir " + d.getVar('B') + "'"
     cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
     cmd = cmd + " --define '_use_internal_dependency_generator 0'"
     cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"