# HG changeset patch # User raptorbot # Date 1265882462 0 # Node ID faed4203d5c698a51b9373fc46e1e111f2ff81cf # Parent 5ec640568a23321d2bea23a4124765bed3d38b63 Fix up file testing with checkwhatcomp and make epocroot driveletter stripping case insensitive. diff -r 5ec640568a23 -r faed4203d5c6 sbsv2/raptor/python/plugins/filter_checkcomp.py --- a/sbsv2/raptor/python/plugins/filter_checkcomp.py Thu Feb 11 10:08:31 2010 +0200 +++ b/sbsv2/raptor/python/plugins/filter_checkcomp.py Thu Feb 11 10:01:02 2010 +0000 @@ -47,6 +47,7 @@ dir = os.path.dirname(bldinf) self.outfile.write("=== %s == %s\n" % (dir, dir)) + self.outfile.write("=== check == %s\n" % (dir)) self.outfile.write("-- abld -w \nChdir %s \n++ Started at\n" % dir) def end_bldinf(self): @@ -54,6 +55,12 @@ def open(self, build_parameters): t = filter_what.FilterWhat.open(self, build_parameters) + if t: + self.outfile.write("===-------------------------------------------------\n") + self.outfile.write("=== check\n") + self.outfile.write("===-------------------------------------------------\n") + self.outfile.write("=== check started Thu Feb 11 10:02:21 2010\n") + self.path_prefix_to_strip = os.path.abspath(build_parameters.epocroot) self.path_prefix_to_add_on = build_parameters.incoming_epocroot return t diff -r 5ec640568a23 -r faed4203d5c6 sbsv2/raptor/python/plugins/filter_what.py --- a/sbsv2/raptor/python/plugins/filter_what.py Thu Feb 11 10:08:31 2010 +0200 +++ b/sbsv2/raptor/python/plugins/filter_what.py Thu Feb 11 10:01:02 2010 +0000 @@ -34,19 +34,27 @@ """Use chars between enclosing tags ("<>", "''", etc) start = opening tag, so the line we need actually starts at 'start + 1' """ + + abs_filename = line[(start + 1):end] + filename = abs_filename.replace("/","\\") + + # Hack drive letters for case insensitivity on windows + + path_prefix_to_strip = self.path_prefix_to_strip if "win" in self.buildparameters.platform: - filename = line[(start + 1):end].replace("/","\\") - else: - filename = line[(start + 1):end] + filename = filename[0].upper()+filename[1:] + filename = filename.replace("/","\\") - if self.path_prefix_to_strip: - if filename.startswith(self.path_prefix_to_strip): - filename = filename[len(self.path_prefix_to_strip):] + if path_prefix_to_strip: + if "win" in self.buildparameters.platform: + path_prefix_to_strip = path_prefix_to_strip[0].upper()+path_prefix_to_strip[1:] + if filename.startswith(path_prefix_to_strip): + filename = filename[len(path_prefix_to_strip):] if self.path_prefix_to_add_on != None: filename = self.path_prefix_to_add_on + filename if self.check: - if not os.path.isfile(filename): + if not os.path.isfile(abs_filename): print "MISSING:", filename self.ok = False else: @@ -64,6 +72,7 @@ def open(self, build_parameters): "initialise" + self.buildparameters = build_parameters if build_parameters.doCheck: self.check = True