merge fix
authorRichard Taylor <richard.i.taylor@nokia.com>
Tue, 02 Mar 2010 17:13:53 +0000
branchfix
changeset 372 e6d6373c0c3a
parent 298 15d964981d94 (diff)
parent 371 2db10eac415a (current diff)
child 373 d8868f997d1c
merge
sbsv2/raptor/RELEASE-NOTES.txt
sbsv2/raptor/python/raptor.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags	Tue Mar 02 17:13:53 2010 +0000
@@ -0,0 +1,3 @@
+1e23e973ab856a45d9e3e2dcd9a72a9e466c03c7 stable
+1e23e973ab856a45d9e3e2dcd9a72a9e466c03c7 stable
+007900c31eef0363e705cf15d131740d4eeb6208 stable
--- a/sbsv2/raptor/RELEASE-NOTES.txt	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/RELEASE-NOTES.txt	Tue Mar 02 17:13:53 2010 +0000
@@ -1,8 +1,13 @@
 Release Notes for Symbian Build System v2
 
-next version
+version 2.12.4
 
 Defect Fixes:
+- SF Bug 2113 - [Raptor] what/check filters can assign files to the wrong components
+- SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
+- Fix: host attribute in recipes was blank in windows, windows cluster builds.
+- SF Bug 1912 - Raptor should take python from the path [if not set with SBS_PYTHON or bundled with Raptor]
+- SF Bug 2042 - [Raptor] component field empty in recipe
 - SF Bug 2007 - [Raptor] GCCE 4.4.1 builds require 4.3.1 and 4.3.2 SBS_GCCE???BIN env vars etc.
 - SF Bug 2000 - [Raptor] Talon fails when installed in a path containing the string '-c' (windows only)
 - SF Bug 1861 - [Raptor] More helpful console message in case of timeouts
@@ -19,8 +24,8 @@
 
 Defect Fixes:
 - Don't print trace "what" information if we do not run the trace compiler.
-     
-     
+
+
 version 2.12.2
 
 Defect Fixes:
--- a/sbsv2/raptor/bin/sbs	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/bin/sbs	Tue Mar 02 17:13:53 2010 +0000
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -17,7 +17,7 @@
 #
 
 # If SBS_HOME is not set in the environment then work it out
-# from the path to this batch file
+# from the path to this script
 if [ -z "$SBS_HOME" ] ; then
 	temp=$0
 	SBS_HOME=$(cd ${temp%/*} && echo $PWD)
@@ -62,30 +62,44 @@
 fi
 
 if [ "$OSTYPE" == "cygwin" ]; then
-
-	SBS_HOME=${SBS_HOME//\\//}
-
 	__MINGW__=${SBS_MINGW:-$SBS_HOME/$HOSTPLATFORM_DIR/mingw}
 	__CYGWIN__=${SBS_CYGWIN:-$SBS_HOME/$HOSTPLATFORM_DIR/cygwin}
-	__PYTHON__=${SBS_PYTHON:-$SBS_HOME/$HOSTPLATFORM_DIR/python264/python.exe}
-	export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/python264}
 
-    # Command for unifying path strings. For example, "c:\some\path" and
-    # "/cygdrive/c/some/path" will both be converted into "c:/some/path".
+	# Command for unifying path strings. For example, "c:\some\path" and
+	# "/cygdrive/c/some/path" will both be converted into "c:/some/path".
 	u="$__CYGWIN__/bin/cygpath.exe -m"
-
+	
+	SBS_HOME=${SBS_HOME//\\//}
+	export SBS_HOME=$($u "$SBS_HOME")
+	
 	__MINGW__=$($u "$__MINGW__")
 	__CYGWIN__=$($u "$__MINGW__")
-	__PYTHON__=$($u "$__PYTHON__")
-
-	export SBS_HOME=$($u "$SBS_HOME")
-
 	export PATH=${__MINGW__}/bin:${__CYGWIN__}/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH
 
 	# Tell Cygwin not to map unix security attributes to windows to
 	# prevent raptor from potentially creating read-only files:
 	export CYGWIN='nontsec nosmbntsec'
 
+	# The python and PYTHONPATH used by Raptor are determined by, in order of precedence:
+	#  1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set)
+	#  2. the python shipped locally with Raptor (if present)
+	#  3. the python on the system PATH and the PYTHONPATH set in the system environment
+
+	__LOCAL_PYTHON__=$SBS_HOME/win32/python264/python.exe
+
+	if [ -n "$SBS_PYTHON" ]; then
+		__PYTHON__=$SBS_PYTHON
+	elif [ -f "$__LOCAL_PYTHON__" ]; then
+		__PYTHON__=$__LOCAL_PYTHON__
+		export PYTHONPATH=
+	else
+		__PYTHON__=python.exe
+	fi
+	__PYTHON__=$($u "$__PYTHON__")		
+
+	if [ -n "$SBS_PYTHONPATH" ]; then
+		export PYTHONPATH=$($u "$SBS_PYTHONPATH")
+	fi
 else
 	export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib}
 	PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH
--- a/sbsv2/raptor/bin/sbs.bat	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/bin/sbs.bat	Tue Mar 02 17:13:53 2010 +0000
@@ -1,5 +1,5 @@
 @rem
-@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 @rem All rights reserved.
 @rem This component and the accompanying materials are made available
 @rem under the terms of the License "Eclipse Public License v1.0"
@@ -28,11 +28,27 @@
 @cd /d %WD%
 :foundhome 
 
-@REM Use the python set by the environment if possible
+@REM The python and PYTHONPATH used by Raptor are determined by, in order of precedence:
+@REM 1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set)
+@REM 2. the python shipped locally with Raptor (if present)
+@REM 3. the python on the system PATH and the PYTHONPATH set in the system environment
+
+@SET __LOCAL_PYTHON__=%SBS_HOME%\win32\python264\python.exe
+@IF NOT "%SBS_PYTHON%"=="" GOTO sbspython
+@IF EXIST %__LOCAL_PYTHON__% GOTO localpython
+@SET __PYTHON__=python.exe
+@GOTO sbspythonpath
+
+:sbspython
 @SET __PYTHON__=%SBS_PYTHON%
-@IF "%__PYTHON__%"=="" SET __PYTHON__=%SBS_HOME%\win32\python264\python.exe
-@SET PYTHONPATH=%SBS_PYTHONPATH%
-@IF "%PYTHONPATH%"=="" SET PYTHONPATH=%SBS_HOME%\win32\python264
+@GOTO sbspythonpath
+
+:localpython
+@SET __PYTHON__=%__LOCAL_PYTHON__%
+@SET PYTHONPATH=
+
+:sbspythonpath
+@IF NOT "%SBS_PYTHONPATH%"=="" SET PYTHONPATH=%SBS_PYTHONPATH%
 
 @REM Use the mingw set by the environment if possible
 @SET __MINGW__=%SBS_MINGW%
--- a/sbsv2/raptor/lib/flm/tracecompiler.mk	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/lib/flm/tracecompiler.mk	Tue Mar 02 17:13:53 2010 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -13,15 +13,34 @@
 # Description:
 # Run Trace Compiler on source files to generate trace headers and decode files
 
+# Set project name as <mmp_name>
 TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META)))
+
+TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+
 # Find out TRACE_PATH
+# first look for .*/traces/traces_<target_name>_<target_extension>
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces/traces_$(TARGET)_$(TARGETEXT),$(DIR))))
+
+ifneq ($(TRACE_PATH),)
+# set project name as <target_name>_<target_extension> instead of <mmp_name>
+TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
+endif
+
+# if not found look for .*/traces_<mmp_name>
+ifeq ($(TRACE_PATH),)
 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
+endif
+
+# if not found look for .*/traces
 ifeq ($(TRACE_PATH),)
 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
 endif
+
+# if not found look for .*/traces_<target_name>_<target_type>
 ifeq ($(TRACE_PATH),)
 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
-# Use target name instead of mmp file name
+# set project name as <target_name>_<target_type> instead of <mmp_name>
 TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
 endif
 
@@ -33,8 +52,6 @@
 
 # Run trace compiler only if TRACE_PATH exists
 ifneq ($(TRACE_PATH),)
-
-
 TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).done
 TRACE_HEADERS:=
 
--- a/sbsv2/raptor/python/plugins/filter_what.py	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/python/plugins/filter_what.py	Tue Mar 02 17:13:53 2010 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -162,17 +162,16 @@
 					
 					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
-							if bi != '':
-								self.start_bldinf(bi)
+			"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
+					if bi != '':
+						self.start_bldinf(bi)
 							
 					
 						
--- a/sbsv2/raptor/python/raptor.py	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/python/raptor.py	Tue Mar 02 17:13:53 2010 +0000
@@ -238,7 +238,7 @@
 class Component(ModelNode):
 	"""A group of projects or, in symbian-speak, a bld.inf.
 	"""
-	def __init__(self, filename):
+	def __init__(self, filename, layername="", componentname=""):
 		super(Component,self).__init__(filename)
 		# Assume that components are specified in bld.inf files for now
 		# One day that tyranny might end.
@@ -249,21 +249,34 @@
 		self.exportspecs = []
 		self.depfiles = []
 		self.unfurled = False # We can parse this
+		
+		# Extra metadata optionally supplied with system definition file gathered components
+		self.layername = layername
+		self.componentname = componentname
 
 	def AddMMP(self, filename):
 		self.children.add(Project(filename))
 
 
 class Layer(ModelNode):
-	""" 	Some components that should be built togther
+	""" Some components that should be built togther
 		e.g. a Layer in the system definition.
+		
+		Components that come from system definition files can
+		have extra surrounding metadata that we need to pass
+		on for use in log output.
 	"""
 	def __init__(self, name, componentlist=[]):
 		super(Layer,self).__init__(name)
 		self.name = name
 
 		for c in componentlist:
-			self.children.add(Component(c))
+			if isinstance(c, raptor_xml.SystemModelComponent):
+				# this component came from a system_definition.xml
+				self.children.add(Component(c, c.GetContainerName("layer"), c.GetContainerName("component")))
+			else:
+				# this is a plain old bld.inf file from the command-line
+				self.children.add(Component(c))
 
 	def unfurl(self, build):
 		"""Discover the children of this layer. This involves parsing the component MetaData (bld.infs, mmps).
--- a/sbsv2/raptor/python/raptor_meta.py	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py	Tue Mar 02 17:13:53 2010 +0000
@@ -2686,15 +2686,6 @@
 
 		specName = getSpecName(component.bldinf_filename, fullPath=True)
 
-		if isinstance(component.bldinf, raptor_xml.SystemModelComponent):
-			# this component came from a system_definition.xml
-			layer = component.bldinf.GetContainerName("layer")
-			componentName = component.bldinf.GetContainerName("component")
-		else:
-			# this is a plain old bld.inf file from the command-line
-			layer = ""
-			componentName = ""
-
 		# exports are independent of build platform
 		for i,ep in enumerate(self.ExportPlatforms):
 			specNode = raptor_data.Specification(name = specName)
@@ -2705,8 +2696,8 @@
 			# add some basic data in a component-wide variant
 			var = raptor_data.Variant(name='component-wide')
 			var.AddOperation(raptor_data.Set("COMPONENT_META", str(component.bldinf_filename)))
-			var.AddOperation(raptor_data.Set("COMPONENT_NAME", componentName))
-			var.AddOperation(raptor_data.Set("COMPONENT_LAYER", layer))
+			var.AddOperation(raptor_data.Set("COMPONENT_NAME", component.componentname))
+			var.AddOperation(raptor_data.Set("COMPONENT_LAYER", component.layername))
 			specNode.AddVariant(var)
 
 			# add this bld.inf Specification to the export platform
@@ -2737,8 +2728,8 @@
 				# add some basic data in a component-wide variant
 				var = raptor_data.Variant(name='component-wide-settings-' + plat)
 				var.AddOperation(raptor_data.Set("COMPONENT_META",str(component.bldinf_filename)))
-				var.AddOperation(raptor_data.Set("COMPONENT_NAME", componentName))
-				var.AddOperation(raptor_data.Set("COMPONENT_LAYER", layer))
+				var.AddOperation(raptor_data.Set("COMPONENT_NAME", component.componentname))
+				var.AddOperation(raptor_data.Set("COMPONENT_LAYER", component.layername))
 				var.AddOperation(raptor_data.Set("MODULE", modulename))
 				var.AddOperation(raptor_data.Append("OUTPUTPATHOFFSET", outputDir, '/'))
 				var.AddOperation(raptor_data.Append("OUTPUTPATH", outputDir, '/'))
@@ -2835,8 +2826,10 @@
 
 			sourceMTime = 0
 			destMTime = 0
+			sourceStat = 0
 			try:
-				sourceMTime = os.stat(source_str)[stat.ST_MTIME]
+				sourceStat = os.stat(source_str)
+				sourceMTime = sourceStat[stat.ST_MTIME]
 				destMTime = os.stat(dest_str)[stat.ST_MTIME]
 			except OSError, e:
 				if sourceMTime == 0:
@@ -2850,6 +2843,9 @@
 				if os.path.exists(dest_str):
 					os.chmod(dest_str,stat.S_IREAD | stat.S_IWRITE)
 				shutil.copyfile(source_str, dest_str)
+
+				# Ensure that the destination file remains executable if the source was also:
+				os.chmod(dest_str,sourceStat[stat.ST_MODE] | stat.S_IREAD | stat.S_IWRITE | stat.S_IWGRP ) 
 				self.__Raptor.Info("Copied %s to %s", source_str, dest_str)
 			else:
 				self.__Raptor.Info("Up-to-date: %s", dest_str)
--- a/sbsv2/raptor/python/raptor_version.py	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/python/raptor_version.py	Tue Mar 02 17:13:53 2010 +0000
@@ -16,7 +16,7 @@
 
 # replace CHANGESET with the Hg changeset for ANY release
 
-version=(2,12,2,"2010-02-17","symbian build system","CHANGESET")
+version=(2,12,4,"2010-03-03","symbian build system","CHANGESET")
 
 def numericversion():
 	"""Raptor version string"""
--- a/sbsv2/raptor/test/smoke_suite/export.py	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/export.py	Tue Mar 02 17:13:53 2010 +0000
@@ -35,6 +35,7 @@
 		"simple_exp1.h exported_1.h\n"
 		"simple_exp2.h exported_2.h\n"
 		"simple_exp3.h exported_3.h\n"
+		"executable_file executable_file\n"
 		'"file with a space.doc" "exportedfilewithspacesremoved.doc"\n'
 		'"file with a space.doc" "exported file with a space.doc"\n\n'
 
@@ -59,6 +60,7 @@
 		"/tmp/$(USER)/simple_exp1.h",
 		"/tmp/$(USER)/simple_exp2.h",
 		"/tmp/$(USER)/simple_exp3.h",
+		"$(EPOCROOT)/epoc32/include/executable_file",
 		"$(EPOCROOT)/epoc32/include/simple_exp4.h"
 		]
 	t.run()
@@ -66,15 +68,31 @@
 		result = SmokeTest.FAIL
 
 
+	t = SmokeTest()
+	t.id = "0023a1"
+	t.name = "export"
+	t.usebash = True
+	t.command = "ls -l ${EPOCROOT}/epoc32/include/executable_file"
+	t.mustmatch = [ "^.rwxrwxr.x .*executable_file.*$" ]
+	t.targets = []
+	t.run("linux")
+	t.usebash = False
+
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
+
+
 	# Testing if clean deletes any exports which it is not supposed to
 	t.id = "0023b"
 	t.name = "export_clean" 
 	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
 			+ "-c armv5 clean"
+	t.mustmatch = []
 	t.targets = [
 		"$(EPOCROOT)/epoc32/include/exported_1.h",
 		"$(EPOCROOT)/epoc32/include/exported_2.h",
 		"$(EPOCROOT)/epoc32/include/exported_3.h",
+		"$(EPOCROOT)/epoc32/include/executable_file",
 		"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc",
 		"$(EPOCROOT)/epoc32/include/exported file with a space.doc",
 		"/tmp/$(USER)/simple_exp1.h",
@@ -95,6 +113,7 @@
 		'$(EPOCROOT)/epoc32/include/exported_1.h',
 		'$(EPOCROOT)/epoc32/include/exported_2.h',
 		'$(EPOCROOT)/epoc32/include/exported_3.h',
+		"$(EPOCROOT)/epoc32/include/executable_file",
 		'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc',
 		'$(EPOCROOT)/epoc32/include/exported file with a space.doc',
 		'/tmp/$(USER)/simple_exp1.h',
@@ -116,6 +135,7 @@
 		'$(EPOCROOT)/epoc32/include/exported_1.h',
 		'$(EPOCROOT)/epoc32/include/exported_2.h',
 		'$(EPOCROOT)/epoc32/include/exported_3.h',
+		"$(EPOCROOT)/epoc32/include/executable_file",
 		'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc',
 		'$(EPOCROOT)/epoc32/include/exported file with a space.doc',
 		'/tmp/$(USER)/simple_exp1.h',
--- a/sbsv2/raptor/test/smoke_suite/sysdef_layers.py	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/sysdef_layers.py	Tue Mar 02 17:13:53 2010 +0000
@@ -20,11 +20,10 @@
 	t = SmokeTest()
 	t.id = "48"
 	t.name = "sysdef_layers"
-	t.description = "Test system_definition.xml layer processing"
-	t.command = 'sbs -s ' + \
-			'smoke_suite/test_resources/sysdef/system_definition_order_layer_test.xml' + \
-			' -l "Metadata Export" -l "Build Generated Source" -l ' + \
-			'"Component with Layer Dependencies" -o'
+	t.usebash = True
+	t.description = "Test system_definition.xml layer processing and log reporting"
+	t.command = 'sbs -f- -s smoke_suite/test_resources/sysdef/system_definition_order_layer_test.xml ' + \
+			'-l "Metadata Export" -l "Build Generated Source" -l "Component with Layer Dependencies" -o'
 	t.targets = [
 		"$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/build_gen_source/exported.inf",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/build_gen_source/exported.mmh",
@@ -82,5 +81,9 @@
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
 		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp"
 		])
+	t.countmatch = [
+		["<recipe .*layer='Component with Layer Dependencies' component='dependent'.*>", 37],
+		["<recipe .*layer='Build Generated Source' component='build generated source'.*>", 7]		
+		]
 	t.run()
 	return t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/logexamples/what_component_repeated.log	Tue Mar 02 17:13:53 2010 +0000
@@ -0,0 +1,15 @@
+<whatlog bldinf='y:/ext/app/emailwizard/bld.inf' mmp='' config='armv5_urel.generic'>
+<build>/epoc32/data/something</build>
+</whatlog>
+
+
+
+<whatlog bldinf='y:/sf/mw/gsprofilesrv/ftuwizardmodel/bld.inf' mmp='y:/sf/mw/gsprofilesrv/ftuwizardmodel/ftuwizardmodel_0x20027009.mmp' config='armv5_urel.generic'>
+<build>/epoc32/release/armv5/something</build>
+</whatlog>
+
+
+
+<whatlog bldinf='y:/ext/app/emailwizard/bld.inf' mmp='' config='armv5_urel.generic'>
+<build>/epoc32/data/something_else</build>
+</whatlog>
--- a/sbsv2/raptor/test/smoke_suite/test_resources/simple_export/bld.inf	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_export/bld.inf	Tue Mar 02 17:13:53 2010 +0000
@@ -26,6 +26,7 @@
 simple_exp3.h exported_3.h
 "file with a space.doc" "exportedfilewithspacesremoved.doc"
 "file with a space.doc" "exported file with a space.doc"
+executable_file	executable_file
 
 simple_exp1.h /tmp/$$(USER)/  //
 simple_exp2.h \tmp\$$(USER)/  //
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/HelloWorld.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/HelloWorld.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -14,7 +14,7 @@
 USERINCLUDE	..\inc  
 USERINCLUDE	..\traces
 SYSTEMINCLUDE	\epoc32\include
-SYSTEMINCLUDE	\epoc32\include\internal
+SYSTEMINCLUDE	\epoc32\include\platform
 
 SOURCEPATH	..\src
 SOURCE		HelloWorld.cpp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/OstTraceDefinitions.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/OstTraceDefinitions.h	Tue Mar 02 17:13:53 2010 +0000
@@ -1,7 +1,7 @@
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-// #define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/tcwinsStaticDLL.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/tcwinsStaticDLL.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2000-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -30,7 +30,7 @@
 
 USERINCLUDE   .
 SYSTEMINCLUDE /epoc32/include
-SYSTEMINCLUDE /epoc32/include/internal
+SYSTEMINCLUDE /epoc32/include/platform
 USERINCLUDE traces
 
 LIBRARY       euser.lib
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/traces/OstTraceDefinitions.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/traces/OstTraceDefinitions.h	Tue Mar 02 17:13:53 2010 +0000
@@ -3,5 +3,5 @@
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
 // REMOVE BEFORE CHECK-IN TO VERSION CONTROL
 #define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
+#include <opensystemtrace.h>
 #endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/multiple_variants/group/tc_variants.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/multiple_variants/group/tc_variants.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -5,7 +5,7 @@
 UID			0x100039ce 0x10000004
 LIBRARY			euser.lib
 SYSTEMINCLUDE		/epoc32/include
-SYSTEMINCLUDE		/epoc32/include/internal
+SYSTEMINCLUDE		/epoc32/include/platform
 
 SOURCEPATH		../src
 SOURCE			tc_main.cpp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/OstTraceDefinitions.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/OstTraceDefinitions.h	Tue Mar 02 17:13:53 2010 +0000
@@ -1,7 +1,7 @@
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-// #define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -5,7 +5,7 @@
 UID			0x100039ce 0x11100001
 LIBRARY			euser.lib
 SYSTEMINCLUDE		/epoc32/include
-SYSTEMINCLUDE		/epoc32/include/internal
+SYSTEMINCLUDE		/epoc32/include/platform
 
 SOURCEPATH		../src
 SOURCE			child1.cpp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -5,7 +5,7 @@
 UID			0x100039ce 0x11100002
 LIBRARY			euser.lib
 SYSTEMINCLUDE		/epoc32/include
-SYSTEMINCLUDE		/epoc32/include/internal
+SYSTEMINCLUDE		/epoc32/include/platform
 
 SOURCEPATH		../src
 SOURCE			child2.cpp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -4,7 +4,7 @@
 UID			0x100039ce 0x11100002
 LIBRARY			euser.lib
 SYSTEMINCLUDE		/epoc32/include
-SYSTEMINCLUDE		/epoc32/include/internal
+SYSTEMINCLUDE		/epoc32/include/platform
 
 SOURCEPATH		../src
 SOURCE			child3.cpp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/OstTraceDefinitions.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/OstTraceDefinitions.h	Tue Mar 02 17:13:53 2010 +0000
@@ -1,7 +1,7 @@
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-// #define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/OstTraceDefinitions.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/OstTraceDefinitions.h	Tue Mar 02 17:13:53 2010 +0000
@@ -1,7 +1,7 @@
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-// #define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/OstTraceDefinitions.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/OstTraceDefinitions.h	Tue Mar 02 17:13:53 2010 +0000
@@ -1,7 +1,7 @@
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-// #define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/group/testTC.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/group/testTC.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -36,6 +36,7 @@
 OS_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE   /epoc32/include/libc
 SYSTEMINCLUDE   /epoc32/include/internal
+SYSTEMINCLUDE   /epoc32/include/platform
 
 LIBRARY         euser.lib
 LIBRARY		iscapi.lib
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/src/wlanhwinit.cpp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/src/wlanhwinit.cpp	Tue Mar 02 17:13:53 2010 +0000
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -43,7 +43,7 @@
 
 EXPORT_C CWlanHwInit* CWlanHwInit::NewL()
     {
-    OstTrace0( TRACE_API, CWLANHWINIT_NEWL, "CWlanHwInit::NewL()" );
+    OstTrace0( TRACE_BORDER, CWLANHWINIT_NEWL, "CWlanHwInit::NewL()" );
     OstTrace0( TRACE_NORMAL, DUP1_CWLANHWINIT_NEWL, "CWlanHwInit::NewL()" );  
     CWlanHwInit* self = new( ELeave ) CWlanHwInit;
     CleanupStack::PushL( self );
@@ -55,7 +55,7 @@
 EXPORT_C CWlanHwInit::~CWlanHwInit()
     {
     TraceDump( INFO_LEVEL, ( _L( "CWlanHwInit::~CWlanHwInit()" ) ) );
-    OstTrace0( TRACE_API, DUP1_CWLANHWINIT_CWLANHWINIT, "CWlanHwInit::~CWlanHwInit()" );
+    OstTrace0( TRACE_BORDER, DUP1_CWLANHWINIT_CWLANHWINIT, "CWlanHwInit::~CWlanHwInit()" );
     OstTrace0( TRACE_NORMAL, DUP2_CWLANHWINIT_CWLANHWINIT, "CWlanHwInit::~CWlanHwInit()" );  
     delete iMain;
     iMain = NULL;
@@ -72,7 +72,7 @@
     TUint& aFwLength )
     {
     TraceDump( INFO_LEVEL, ( _L( "CWlanHwInit::GetHwInitData()" ) ) );
-    OstTrace0( TRACE_API, DUP1_CWLANHWINIT_GETHWINITDATA, "CWlanHwInit::GetHwInitData()" );
+    OstTrace0( TRACE_BORDER, DUP1_CWLANHWINIT_GETHWINITDATA, "CWlanHwInit::GetHwInitData()" );
     OstTrace0( TRACE_NORMAL, CWLANHWINIT_GETHWINITDATA, "CWlanHwInit::GetHwInitData()" );
     
     //BOB10d initialization data block is in one piece (NVS + FW)
@@ -97,7 +97,7 @@
     TMacAddr& aMacAddress )
     {
     TraceDump( INFO_LEVEL, ( _L( "CWlanHwInit::GetMacAddress()" ) ) );
-    OstTrace0( TRACE_API, CWLANHWINIT_GETMACADDRESS, "CWlanHwInit::GetMacAddress()" );
+    OstTrace0( TRACE_BORDER, CWLANHWINIT_GETMACADDRESS, "CWlanHwInit::GetMacAddress()" );
     OstTrace0( TRACE_NORMAL, DUP1_CWLANHWINIT_GETMACADDRESS, "CWlanHwInit::GetMacAddress()" ); 
     return iMain->GetMacAddress( aMacAddress );
     }
@@ -113,7 +113,7 @@
     TUint& aFwLength )
     {
     TraceDump( INFO_LEVEL, ( _L( "CWlanHwInit::GetHwTestInitData()" ) ) );
-    OstTrace0( TRACE_API, CWLANHWINIT_GETHWTESTINITDATA, "CWlanHwInit::GetHwTestInitData()" );
+    OstTrace0( TRACE_BORDER, CWLANHWINIT_GETHWTESTINITDATA, "CWlanHwInit::GetHwTestInitData()" );
     OstTrace0( TRACE_NORMAL, DUP1_CWLANHWINIT_GETHWTESTINITDATA, "CWlanHwInit::GetHwTestInitData()" );
     
     //BOB10d initialization data block is in one piece (NVS + FW)
@@ -139,7 +139,7 @@
     TDes8& aData )
     {
     TraceDump( INFO_LEVEL, ( _L( "CWlanHwInit::GetHwTestData()" ) ) );
-    OstTrace0( TRACE_API, DUP1_CWLANHWINIT_GETHWTESTDATA, "CWlanHwInit::GetHwTestData()" );   
+    OstTrace0( TRACE_BORDER, DUP1_CWLANHWINIT_GETHWTESTDATA, "CWlanHwInit::GetHwTestData()" );   
     OstTrace0( TRACE_NORMAL, CWLANHWINIT_GETHWTESTDATA, "CWlanHwInit::GetHwTestData()" );  
     return iMain->GetHwTestData( aId, aData );
     }
@@ -153,7 +153,7 @@
     TDesC8& aData )
     {
     TraceDump( INFO_LEVEL, ( _L( "CWlanHwInit::SetHwTestData()" ) ) );
-    OstTrace0( TRACE_API, DUP1_CWLANHWINIT_SETHWTESTDATA, "CWlanHwInit::SetHwTestData()" ); 
+    OstTrace0( TRACE_BORDER, DUP1_CWLANHWINIT_SETHWTESTDATA, "CWlanHwInit::SetHwTestData()" ); 
     OstTrace0( TRACE_NORMAL, CWLANHWINIT_SETHWTESTDATA, "CWlanHwInit::SetHwTestData()" );
     return iMain->SetHwTestData( aId, aData );
     }
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/traces/OstTraceDefinitions.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/traces/OstTraceDefinitions.h	Tue Mar 02 17:13:53 2010 +0000
@@ -1,7 +1,7 @@
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-// #define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/variant_source/group/invariant_source.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/variant_source/group/invariant_source.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -4,7 +4,7 @@
 UID			0x100039ce 0x10000002
 LIBRARY			euser.lib
 SYSTEMINCLUDE		/epoc32/include
-SYSTEMINCLUDE		/epoc32/include/internal
+SYSTEMINCLUDE		/epoc32/include/platform
 SOURCEPATH		../src
 SOURCE			inv_source.cpp
 
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/variant_source/group/variant_source.mmp	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/variant_source/group/variant_source.mmp	Tue Mar 02 17:13:53 2010 +0000
@@ -6,7 +6,7 @@
 UID			0x100039ce 0x10000003
 LIBRARY			euser.lib
 SYSTEMINCLUDE		/epoc32/include
-SYSTEMINCLUDE		/epoc32/include/internal
+SYSTEMINCLUDE		/epoc32/include/platform
 
 SOURCEPATH		../src
 SOURCE			var_source1.cpp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/OstTraceDefinitions.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/OstTraceDefinitions.h	Tue Mar 02 17:13:53 2010 +0000
@@ -1,7 +1,7 @@
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-// #define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- a/sbsv2/raptor/test/smoke_suite/whatcomp.py	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/whatcomp.py	Tue Mar 02 17:13:53 2010 +0000
@@ -57,8 +57,8 @@
 	]
 	warnings = 0
 	
-	t.id = "0106"
-	t.name = "whatcomp"
+	t.id = "0106a"
+	t.name = "whatcomp_basic"
 	t.description = description
 	t.command = command % "arm.v5.urel.gcce4_4_1"
 	t.targets = targets
@@ -67,5 +67,27 @@
 	t.warnings = warnings
 	t.run()
 
+	t.id = "0106a"
+	t.name = "whatcomp_component_repeated"
+	t.description = """
+			It is possible for what information about a component to not be grouped
+			(i.e. for multiple whatlogs tags relating to a single component to be 
+			interspersed with whatlog tags relating to other components).  
+			Raptor must cope with that and must *not* report missing files under 
+			the wrong component name."""
+	t.command = "sbs_filter --filters=FilterWhatComp < smoke_suite/test_resources/logexamples/what_component_repeated.log"
+	t.targets = []
+	t.mustmatch = [] 
+	t.mustmatch_multiline = [ 
+		"Chdir y:.ext.app.emailwizard.*epoc32.data.something.*"+
+		"Chdir y:.sf.mw.gsprofilesrv.ftuwizardmodel.*epoc32.release.armv5.something.*"+
+		"Chdir y:.ext.app.emailwizard.*epoc32.data.something_else"
+		]
+
+	t.mustnotmatch = []
+	t.warnings = 0
+	t.run()
+
+	t.id = "0106"
 	t.print_result()
 	return t
--- a/sbsv2/raptor/util/config.h	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/util/config.h	Tue Mar 02 17:13:53 2010 +0000
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -21,6 +21,7 @@
 #define HAS_GETCOMMANDLINE 1
 #define HAS_MILLISECONDSLEEP 1
 #define HAS_MSVCRT 1
+#define HAS_WINSOCK2 1
 #else
 #define HAS_POLL 1
 #define HAS_SETENV 1
--- a/sbsv2/raptor/util/gccprogram.mk	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/util/gccprogram.mk	Tue Mar 02 17:13:53 2010 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -62,7 +62,7 @@
 $(foreach SOURCEFILE,$(SOURCES),$(c2obj))
 
 $(BINDIR)/$(TARGET)$(PROGRAMEXT): $$(OBJECTS)
-	gcc $(LDFLAGS) $$^ -o $$@
+	gcc  $$^ $(LDFLAGS) -o $$@
 	
 $$(shell mkdir -p $(OUTPUTPATH)/$(TARGET))
 
--- a/sbsv2/raptor/util/talon/Makefile	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/util/talon/Makefile	Tue Mar 02 17:13:53 2010 +0000
@@ -29,6 +29,7 @@
 else
 LDFLAGS:=$(subst \,/,$(SBS_MINGW:\=/)\lib\libiberty.a)
 endif
+LDFLAGS:=$(LDFLAGS) -Wl,-lws2_32
 else
 CHOMP_C:=
 PROCESS_C:=process.c
--- a/sbsv2/raptor/util/talon/talon.c	Tue Mar 02 09:54:25 2010 +0000
+++ b/sbsv2/raptor/util/talon/talon.c	Tue Mar 02 17:13:53 2010 +0000
@@ -16,6 +16,11 @@
 */
 
 
+#ifdef HAS_WINSOCK2
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define WIN32_LEAN_AND_MEAN
+#endif
 
 
 #include <stdlib.h>
@@ -48,6 +53,8 @@
 #define VARNAMEMAX 100
 #define VARVALMAX 1024
 
+#define HOSTNAME_MAX 100
+
 
 #include "log.h"
 
@@ -56,6 +63,7 @@
 unsigned int _CRT_fmode = _O_BINARY;
 #endif
 
+
 double getseconds(void)
 {
 	struct timeval tp;
@@ -129,7 +137,7 @@
 				att++;
 			} while ( e < (VARNAMEMAX-1) && (isalnum(*att) || *att == '_'));
 			envvarname[e] = '\0';
-/* DEBUG(("envvarname: %s\n", envvarname)); */
+			/* DEBUG(("envvarname: %s\n", envvarname));*/ 
 			v = talon_getenv(envvarname);
 			if (v)
 			{
@@ -233,6 +241,18 @@
 	char *recipe = NULL;
 	int talon_returncode = 0;
 
+#ifdef HAS_WINSOCK2
+	WSADATA wsaData;
+
+	WSAStartup(MAKEWORD(2,2), &wsaData);
+
+	/* We ignore the result as we are only doing this to use gethostname
+	   and if that fails then leaving the host attribute blank is perfectly
+	   acceptable.
+	*/
+
+#endif
+
 #ifdef HAS_GETCOMMANDLINE
 	char *commandline= GetCommandLine();
 	/*
@@ -332,6 +352,20 @@
 
 	DEBUG(("talon: recipe: %s\n", recipe));
 
+	/* Make sure that the agent's hostname can be put into the host attribute */
+	char hostname[HOSTNAME_MAX];
+	int hostresult=0;
+	
+	hostresult = gethostname(hostname, HOSTNAME_MAX-1);
+	if (0 != hostresult)
+	{
+		DEBUG(("talon: failed to get hostname: %d\n", hostresult));
+		hostname[0] = '\0';
+	}
+
+	talon_setenv("HOSTNAME", hostname);
+	DEBUG(("talon: setenv: hostname: %s\n", hostname));
+
 	
 	char varname[VARNAMEMAX];
 	char varval[VARVALMAX];
Binary file sbsv2/raptor/win32/bin/talon.exe has changed