diff -r 3a31ca4b29c4 -r b8fa7dfeeaa1 sbsv2/raptor/python/raptor_xml.py --- a/sbsv2/raptor/python/raptor_xml.py Wed Aug 04 12:07:55 2010 +0100 +++ b/sbsv2/raptor/python/raptor_xml.py Wed Oct 06 15:13:17 2010 +0100 @@ -317,8 +317,8 @@ return component def __GetEffectiveLayer(self, aElement): - #' return the ID of the topmost item which has an ID. For 1.x and 2.x, this will always be layer, for 3.x, it will be the topmost ID'd element in the file - # never call this on the root element + # return the ID of the topmost item which has an ID. For 1.x and 2.x, this will always be layer, + # for 3.x, it will be the topmost ID'd element in the file never call this on the root element if aElement.parentNode.hasAttribute(self.__IdAttribute): return self.__GetEffectiveLayer(aElement.parentNode) elif aElement.hasAttribute(self.__IdAttribute): @@ -337,10 +337,19 @@ self.__GetElementContainers(parent, aContainers) + def __ProcessSystemModelMetaElement(self, aElement): + # stub method - may deal with metadata elements at some point in the future + return + def __ProcessSystemModelElement(self, aElement): """Search for XML elements with 'bldFile' attributes and resolve concrete bld.inf locations with an appreciation of different schema versions.""" + # Metadata elements are processed separately - there are no further child nodes + # to process in this context + if aElement.tagName == "meta" : + return self.__ProcessSystemModelMetaElement(aElement) + # The effective "layer" is the item whose parent does not have an id (or name in 2.x and earlier) if not aElement.parentNode.hasAttribute(self.__IdAttribute) : currentLayer = aElement.getAttribute(self.__IdAttribute) @@ -380,8 +389,12 @@ if not group.isAbsolute() and bldInfRoot: group = generic_path.Join(bldInfRoot, group) else: - # only absolute paths are changed by root var in 3.x - if group.isAbsolute() and bldInfRoot: + # relative paths for v3 + if not group.isAbsolute(): + group = generic_path.Join(generic_path.Join(self.__SystemDefinitionFile).Dir(),group) + # absolute paths for v3 + # are relative to bldInfRoot if set, or relative to the drive root otherwise + elif bldInfRoot: group = generic_path.Join(bldInfRoot, group) bldinf = generic_path.Join(group, "bld.inf").FindCaseless() @@ -389,7 +402,7 @@ if bldinf == None: # recording layers containing non existent bld.infs bldinfname = group.GetLocalString() - bldinfname = bldinfname + 'bld.inf' + bldinfname = bldinfname+'/'+'bld.inf' layer = self.__GetEffectiveLayer(aElement) if not layer in self.__MissingBldInfs: self.__MissingBldInfs[layer]=[]