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.
This commit is contained in:
Arcitec
2023-05-09 17:12:12 +02:00
committed by Eino Rauhala
parent 07cbe2cc08
commit 5f072b8b67

View File

@@ -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