diff -r 5c33f37d47a4 -r f1baeb3f075f common/tools/raptor/RaptorError.pm --- a/common/tools/raptor/RaptorError.pm Tue Jul 21 13:32:34 2009 +0100 +++ b/common/tools/raptor/RaptorError.pm Wed Jul 22 10:58:34 2009 +0100 @@ -27,6 +27,7 @@ $buildlog_status->{name} = 'buildlog_status'; $buildlog_status->{next_status} = {error=>$buildlog_error_status}; +$buildlog_status->{on_start} = 'RaptorError::on_start_buildlog'; $buildlog_error_status->{name} = 'buildlog_error_status'; $buildlog_error_status->{next_status} = {}; @@ -66,10 +67,21 @@ } } +sub on_start_buildlog +{ + RaptorCommon::init(); + + $filename = "$::basedir/errors.txt"; + if (!-f$filename) + { + print "Writing error file $filename\n"; + open(FILE, ">$filename"); + close(FILE); + } +} + sub on_start_buildlog_error { - $filename = "$::basedir/errors.txt"; - print "Writing error file $filename\n" if (!-f$filename); open(FILE, ">>$filename"); }