From 5f072b8b671ccb68b8e15aff62abebda4ac1115a Mon Sep 17 00:00:00 2001 From: Arcitec <38923130+Arcitec@users.noreply.github.com> Date: Tue, 9 May 2023 17:12:12 +0200 Subject: [PATCH] fix: faster installation of custom RPMs Thanks to leveraging Bash arrays, we are now able to use parameter expansion to perform every package installation as one rpm-ostree operation instead of individual ones. This will give us a huge build speedup. Bash properly expands every array element as safely quoted arguments, complete with support for spaces and special characters. --- build.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index ad9ced6fe5..fea47eb2ae 100644 --- a/build.sh +++ b/build.sh @@ -36,10 +36,8 @@ rpm-ostree override remove firefox firefox-langpacks get_yaml_array install_rpms '.rpms[]' if [[ ${#install_rpms[@]} -gt 0 ]]; then echo "-- Installing RPMs defined in recipe.yml --" - for pkg in "${install_rpms[@]}"; do - echo "Installing: ${pkg}" - rpm-ostree install $pkg - done + echo "Installing: ${install_rpms[@]}" + rpm-ostree install "${install_rpms[@]}" echo "---" fi