Cause whatcomp output to use the incoming epocroot value. i.e. if epocroot is relative then so is the what output. wip
authortimothy.murphy@nokia.com
Fri, 18 Dec 2009 18:19:11 +0000
branchwip
changeset 115 5869e06bf2ac
parent 114 35ed82e9d574
child 116 9874c5dbccd7
Cause whatcomp output to use the incoming epocroot value. i.e. if epocroot is relative then so is the what output. e.g. if EPOCROOT=\ then the output will be of the form "\epoc32\release\armv5\...." If it's "..\myepocroot" then the output will be "..\myepocroot\epoc32\release\armv5". If it's absolute then the what output will also be absolute.
sbsv2/raptor/bin/sbs_filter.py
sbsv2/raptor/python/plugins/filter_what.py
sbsv2/raptor/python/plugins/filter_whatcomp.py
sbsv2/raptor/python/raptor.py
--- a/sbsv2/raptor/bin/sbs_filter.py	Wed Dec 16 15:25:49 2009 +0000
+++ b/sbsv2/raptor/bin/sbs_filter.py	Fri Dec 18 18:19:11 2009 +0000
@@ -62,7 +62,7 @@
 	
 except Exception, e:
 	sys.stderr.write("filter exception: %s\n" % str(e))
-	traceback.print_ex()
+	traceback.print_exc()
 	sys.exit(1)
 		
 # read stdin a line at a time and pass it to the Raptor object
--- a/sbsv2/raptor/python/plugins/filter_what.py	Wed Dec 16 15:25:49 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_what.py	Fri Dec 18 18:19:11 2009 +0000
@@ -25,7 +25,7 @@
 	def __init__(self):
 		super(filter_interface.Filter,self).__init__(self)
 		self.path_prefix_to_strip = None
-		print "HELLO=------"
+		self.path_prefix_to_add_on = None
 	
 	def print_file(self, line, start, end):
 		"Ensure DOS slashes on Windows"
@@ -41,6 +41,8 @@
 		if self.path_prefix_to_strip:
 			if filename.startswith(self.path_prefix_to_strip):
 				filename = filename[len(self.path_prefix_to_strip):]
+			if self.path_prefix_to_add_on != None:
+				filename += self.path_prefix_to_add_on
 			
 		if self.check:
 			if not os.path.isfile(filename):
--- a/sbsv2/raptor/python/plugins/filter_whatcomp.py	Wed Dec 16 15:25:49 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_whatcomp.py	Fri Dec 18 18:19:11 2009 +0000
@@ -24,8 +24,7 @@
 class FilterWhatComp(filter_what.FilterWhat):
 
         def __init__(self): 
-		super(filter_what.FilterWhat,self).__init__()
-		self.path_prefix_to_strip = os.path.abspath(os.environ["EPOCROOT"])
+		super(filter_what.FilterWhat, self).__init__()
 
 	def write(self, text):
 		"process some log text"
@@ -49,3 +48,9 @@
 		
 	def end_bldinf(self):
 		self.outfile.write("++ Finished\n")
+
+        def open(self, build_parameters):
+		t = filter_what.FilterWhat.open(self, build_parameters)
+		self.path_prefix_to_strip = os.path.abspath(build_parameters.epocroot)
+		self.path_prefix_to_add_on = build_parameters.incoming_epocroot
+		return t
--- a/sbsv2/raptor/python/raptor.py	Wed Dec 16 15:25:49 2009 +0000
+++ b/sbsv2/raptor/python/raptor.py	Fri Dec 18 18:19:11 2009 +0000
@@ -58,12 +58,15 @@
 # defaults can use EPOCROOT
 
 if "EPOCROOT" in os.environ:
-        epocroot = os.environ["EPOCROOT"].replace("\\","/")
+	incoming_epocroot = os.environ["EPOCROOT"]
+        epocroot = incoming_epocroot.replace("\\","/")
 else:
 	if 'linux' in hostplatform:
 		epocroot=os.environ['HOME'] + os.sep + "epocroot"
 		os.environ["EPOCROOT"] = epocroot
+		incoming_epocroot = epocroot
 	else:
+		incoming_epocroot = "\\"
 		epocroot = "/"
 		os.environ["EPOCROOT"] = os.sep
 
@@ -1334,6 +1337,8 @@
 class BuildStats(object):
 
 	def __init__(self, raptor_instance):
+		self.incoming_epocroot = incoming_epocroot
+		self.epocroot = epocroot
 		self.logFileName = raptor_instance.logFileName
 		self.quiet = raptor_instance.quiet
 		self.doCheck = raptor_instance.doCheck