diff options
-rwxr-xr-x | ulri | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -489,7 +489,33 @@ foreach my $prefix (keys %pkg_tree) { $fpath =~ tr!/!!s; # Squash double slashes ... $fpath =~ s!/!//!; # ... except for http:// - $text .= "\nFailure details available in $fpath\n"; + $text .= "\nFailure details available in $fpath/log\n"; + $text .= "Reason:\n"; + open my $FP, "$fail_dir/$prefix/log/status.log"; + while (<$FP>) { + $text .= $_; + } + close $FP; + + $text .= "\nLog files generated:\n"; + + opendir my $DP1, "$fail_dir/$prefix/log/"; + foreach my $f1 (readdir $DP1) { + if (not -d "$fail_dir/$prefix/log/$f1" or $f1 =~ m/^\./) { + next; + } + + opendir my $DP2, "$fail_dir/$prefix/log/$f1"; + foreach my $f2 (readdir $DP2) { + if ($f2 =~ m/^\./) { + next; + } + $text .= "$fpath/log/$f1/$f2\n"; + } + closedir DP2; + } + closedir $DP1; + sendmail($to, $cc, "Rebuild failed on $arch for $srpms", $text, "Ulri the scheduler bot <$config->{admin}>", 0); |