From e5dced1d74649891c07f15b89cb6a30b14f22809 Mon Sep 17 00:00:00 2001 From: Alad Wenter Date: Tue, 26 Nov 2024 09:26:02 +0100 Subject: [PATCH] build: error on partially built package group --- lib/pacman/aur-build | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/pacman/aur-build b/lib/pacman/aur-build index 72f56734..59834dad 100755 --- a/lib/pacman/aur-build +++ b/lib/pacman/aur-build @@ -387,16 +387,21 @@ while IFS= read "${read_args[@]}" -ru "$fd" path; do printf '%q\n' >&2 "${exists[@]}" create_package=0 + if [[ -v results_file ]]; then + printf "exist:file://%s\n" "${exists[@]}" | tee -a "$results_file" >/dev/null + fi + elif (( ${#exists[@]} )); then # Since `makepkg` does not allow building split packages - # individually, we restart the build when part of the + # individually, we require a new build when part of the # package group is unavailable (including -debug packages) - printf >&2 '%s: warning: package group partially built\n' "$argv0" + printf >&2 '%s: error: package group partially built\n' "$argv0" printf '%q\n' >&2 "${exists[@]}" - fi - if (( ${#exists[@]} )) && [[ -v results_file ]]; then - printf "exist:file://%s\n" "${exists[@]}" | tee -a "$results_file" >/dev/null + # Rebuilding the package group at this stage may result in + # checksum errors, if part of the package group is + # available in pacman's cache, so we exit with an error. + exit 2 fi fi -- 2.11.4.GIT