From 4cdacf5ae4ef6cde7a09dcb75388b53effd966f5 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Tue, 22 Feb 2022 09:36:46 +0000 Subject: [PATCH] build_library/build_image_util: disable ebuild-locks when merging binary packages Disable ebuild-locks for the emerge command that creates the image. Ebuild-locks protect unsandboxed ebuild phases from running concurrently, but also slow things down greatly when a lot of concurrency would otherwise be possible. The image build phase merges a big amount of binary packages, and I am not aware of us having any phases that risk concurrently modifying shared files. I have been testing this for the last months and have not seen any failures. The time savings are significant: this cuts image build time from 20m to 10m for me. Signed-off-by: Jeremi Piotrowski --- build_library/build_image_util.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index 4e29cadf88..618d383990 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -155,6 +155,7 @@ emerge_to_image() { fi sudo -E ROOT="${root_fs_dir}" \ + FEATURES="-ebuild-locks" \ PORTAGE_CONFIGROOT="${BUILD_DIR}"/configroot \ emerge --root-deps=rdeps --usepkgonly --jobs="${NUM_JOBS}" -v "$@"