summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-05-26 15:59:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-06-03 16:30:56 +0100
commit2691f9aa0d9e4ee8faec5b5fc35a136fbecc8fac (patch)
treeb511250e419d689c208d87a824491214a64f533b
parent893636b299b7d056063aea50fc3d3e49e8ec3a79 (diff)
downloadpoky-2691f9aa0d9e4ee8faec5b5fc35a136fbecc8fac.tar.gz
package_rpm: pass XZ_THREADS to rpm
By default RPM uses the number of cores as the number of threads to use, which can result in quite antisocial memory usage. As we control the macros for compression anyway, we can pass XZ_THREADS to limit the number of threads if needed. (From OE-Core rev: b1e9fe67a85be516a0b32e0c91448df87a756e02) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b9c983eb22a9b0771a0454216d1d7cbb5f3f8a16) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package_rpm.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7de409197e..fc9007922a 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -678,8 +678,8 @@ python do_package_rpm () {
678 cmd = cmd + " --define '_use_internal_dependency_generator 0'" 678 cmd = cmd + " --define '_use_internal_dependency_generator 0'"
679 cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'" 679 cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
680 cmd = cmd + " --define '_build_id_links none'" 680 cmd = cmd + " --define '_build_id_links none'"
681 cmd = cmd + " --define '_binary_payload w6T.xzdio'" 681 cmd = cmd + " --define '_binary_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
682 cmd = cmd + " --define '_source_payload w6T.xzdio'" 682 cmd = cmd + " --define '_source_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
683 cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'" 683 cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
684 cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'" 684 cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
685 cmd = cmd + " --define '_buildhost reproducible'" 685 cmd = cmd + " --define '_buildhost reproducible'"