Skip to content

Commit e5dced1

Browse files
committed
build: error on partially built package group
1 parent d78bbd0 commit e5dced1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

lib/pacman/aur-build

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,16 +387,21 @@ while IFS= read "${read_args[@]}" -ru "$fd" path; do
387387
printf '%q\n' >&2 "${exists[@]}"
388388
create_package=0
389389

390+
if [[ -v results_file ]]; then
391+
printf "exist:file://%s\n" "${exists[@]}" | tee -a "$results_file" >/dev/null
392+
fi
393+
390394
elif (( ${#exists[@]} )); then
391395
# Since `makepkg` does not allow building split packages
392-
# individually, we restart the build when part of the
396+
# individually, we require a new build when part of the
393397
# package group is unavailable (including -debug packages)
394-
printf >&2 '%s: warning: package group partially built\n' "$argv0"
398+
printf >&2 '%s: error: package group partially built\n' "$argv0"
395399
printf '%q\n' >&2 "${exists[@]}"
396-
fi
397400

398-
if (( ${#exists[@]} )) && [[ -v results_file ]]; then
399-
printf "exist:file://%s\n" "${exists[@]}" | tee -a "$results_file" >/dev/null
401+
# Rebuilding the package group at this stage may result in
402+
# checksum errors, if part of the package group is
403+
# available in pacman's cache, so we exit with an error.
404+
exit 2
400405
fi
401406
fi
402407

0 commit comments

Comments
 (0)