Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment25
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index c26a71b..82543ae 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -108,6 +108,31 @@ if [ "$5" = 'ERROR' ]; then
"${work_dir}/build-list"
fi
+ # release lock on build-list - otherwise seed-build-list won't run
+ flock -u 9
+
+ haskell_rebuild_packages=$(
+ find "${build_log_directory}/error" -type f \
+ -name "$1.$2.$3.$4.*.build-log.gz" \
+ -exec zgrep -qFx ' The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.' {} \; \
+ -exec zcat {} \; | \
+ sed -n '
+ s/^installed package \(.*\) is broken due to missing package .*$/\1/
+ T
+ p
+ ' | \
+ tr ' ' '\n' | \
+ sed '
+ s/^/-p ^/
+ s/-[0-9.]\+$/\$/
+ ' | \
+ sort -u
+ )
+ if [ -n "${haskell_rebuild_packages}" ]; then
+ # shellcheck disable=SC2086
+ seed-build-list ${haskell_rebuild_packages}
+ fi
+
exit 0
fi