From 21967250e7d14431155fa218d539bcd5e5809cb0 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 24 Mar 2011 18:55:00 -0400 Subject: metabuild: Write last 100 lines of log file on failing build Prefix with | like bitbake does. --- bin/metabuild | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/metabuild b/bin/metabuild index 455d403..aeb0944 100755 --- a/bin/metabuild +++ b/bin/metabuild @@ -104,22 +104,23 @@ class OutputFilter(object): return False def _write_last_log_lines(self): + _last_line_limit = 100 f = open(logfile_path) lines = [] for line in f: if line.startswith('metabuild: '): continue lines.append(line) - if len(lines) > 10: + if len(lines) > _last_line_limit: lines.pop(0) f.close() for line in lines: + self.output.write('| ') self.output.write(line) def _final_output(self, successful): if not successful: - # disabled temporarily - #self._write_last_log_lines() + self._write_last_log_lines() pass self.output.write("metabuild: %s %s: %d warnings\n" % (target_phase, 'success' if successful else 'failed', -- cgit