From fffb7bc6e29d8a92923d70484b5e17cede736065 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 24 Jun 2019 15:19:58 +0200 Subject: bin/return-assignment: correctly reschedule when haskell-* reports "Bad interface file: " --- bin/return-assignment | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'bin/return-assignment') 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:]' | \ -- cgit v1.2.3-70-g09d2