summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-24 15:19:58 +0200
committerErich Eckner <git@eckner.net>2019-06-24 15:19:58 +0200
commitfffb7bc6e29d8a92923d70484b5e17cede736065 (patch)
tree1c5d0adb4a7a80ffc12bd8db995022c6ccd4cc1d
parentb191127e68f221ea9ca0be98d899a45711cd2e82 (diff)
downloadbuilder-fffb7bc6e29d8a92923d70484b5e17cede736065.tar.xz
bin/return-assignment: correctly reschedule when haskell-* reports "Bad interface file: "
-rwxr-xr-xbin/return-assignment15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index a93ce3e..3ff8989 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -229,10 +229,13 @@ if [ "$6" = 'ERROR' ]; then
# $time_stamp
broken_haskell_packages=$(mktemp 'tmp.return-assignment.broken-haskell-packages.XXXXXXXXXX' --tmpdir)
trap 'rm "${broken_haskell_packages}"' EXIT
-
find "${build_log_directory}/error" -type f \
-name "$1.$2.$3.$4.$5.*.build-log.gz" \
- -exec zgrep -qF '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 zgrep -qF "$(
+ printf '%s\n' \
+ 'The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.'
+ 'mismatched interface file versions (wanted '
+ )" {} \; \
-printf '%p\n' | \
sed '
s/^.*\.\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}\)\.build-log\.gz$/\1 \0/
@@ -242,10 +245,12 @@ if [ "$6" = 'ERROR' ]; then
date +%s -d"${build_time}"
)
zcat "${build_log}" | \
- sed -n '
+ sed '
s/^installed package \(.*\) is broken due to missing package .*$/\1/
- T
- p
+ t
+ s@^.*Bad interface file: /usr/lib/ghc-[0-9.]\+/site-local/\([^/]\+\)-[0-9.]\+/.*$@\1@
+ t
+ d
' | \
tr ' ' '\n' | \
tr '[:upper:]' '[:lower:]' | \