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-02 23:32:45 +0100
commiteb766b57aa7963ef7dc227d175e67084ca5f4a50 (patch)
tree5123ce1e6e33ae3e65e896973eb61186338a676c
parent8ef272941c50602f822c16c695207310d1626f54 (diff)
downloadpoky-eb766b57aa7963ef7dc227d175e67084ca5f4a50.zip
poky-eb766b57aa7963ef7dc227d175e67084ca5f4a50.tar.gz
poky-eb766b57aa7963ef7dc227d175e67084ca5f4a50.tar.bz2
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: 959e1faa911ee67d5d84a57b932135b76cac6a53) Signed-off-by: Ross Burton <ross.burton@arm.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 84a9a6d..86706da8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -684,8 +684,8 @@ python do_package_rpm () {
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
cmd = cmd + " --define '_build_id_links none'"
- cmd = cmd + " --define '_binary_payload w6T.xzdio'"
- cmd = cmd + " --define '_source_payload w6T.xzdio'"
+ cmd = cmd + " --define '_binary_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
+ cmd = cmd + " --define '_source_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
cmd = cmd + " --define '_buildhost reproducible'"