--- a/sbsv2/raptor/python/plugins/filter_what.py Sun Dec 06 18:26:19 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_what.py Thu Dec 10 15:49:23 2009 +0000
@@ -42,6 +42,12 @@
self.outfile.write(filename+"\n")
self.prints += 1
+
+ def start_bldinf(self, bldinf):
+ pass
+
+ def end_bldinf(self):
+ pass
def open(self, build_parameters):
@@ -79,6 +85,10 @@
"Regex for zip exports"
self.zip_export_regex = re.compile("^<member>.*")
+
+ "Regex for determining bld.inf name"
+ self.whatlog_regex = re.compile("^<whatlog *bldinf='(?P<bldinf>[^']*)'.*")
+ self.current_bldinf = ''
self.prints = 0
self.ok = True
@@ -105,6 +115,7 @@
self.repetitions[line] = 0
if self.repetitions[line] == 0:
+
if self.regex.match(line) and (self.what or self.check):
"Print the whole line"
self.print_file(line, (-1), len(line))
@@ -129,6 +140,19 @@
end = line.rfind("<")
self.print_file(line, start, end)
+
+ else:
+ "work out what the 'current' bldinf file is"
+ m = self.whatlog_regex.match(line)
+ if m:
+ bi = m.groupdict()['bldinf']
+ if self.current_bldinf != bi:
+ if self.current_bldinf != '':
+ self.end_bldinf()
+ self.current_bldinf = bi
+ self.start_bldinf(bi)
+
+
self.repetitions[line] += 1