fix: bug 1570 - Adding then removing a capability can fail. e.g. ALL -TCB TCB
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm Mon Jan 18 20:59:13 2010 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Tue Jan 19 19:11:02 2010 +0000
@@ -385,9 +385,7 @@
ifneq ($(DOPOSTLINK),)
# Capabilities
-ADDED_CAPABILITIES:=$(subst $(CHAR_SPACE),+,$(filter-out -%,$(CAPABILITY)))
-SUBTRACTED_CAPABILITIES:=$(subst $(CHAR_SPACE),,$(filter -%,$(CAPABILITY)))
-FINAL_CAPABILITIES:=$(if $(ADDED_CAPABILITIES),$(ADDED_CAPABILITIES)$(SUBTRACTED_CAPABILITIES),NONE)
+FINAL_CAPABILITIES:=$(if $(CAPABILITIES),$(CAPABILITIES),NONE)
# Paging options for the old postlinker
POSTLINKER_PAGEDOPTION:=--defaultpaged
--- a/sbsv2/raptor/python/raptor_meta.py Mon Jan 18 20:59:13 2010 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py Tue Jan 19 19:11:02 2010 +0000
@@ -1451,7 +1451,12 @@
elif varname=='CAPABILITY':
for cap in toks[1]:
+ cap = cap.lower()
self.__debug("Setting "+toks[0]+": " + cap)
+ if cap.lower() != "all":
+ if not cap.startswith("-"):
+ if not cap.startswith("+"):
+ cap = "+" + cap
self.capabilities.append(cap)
elif varname=='DEFFILE':
self.__defFileRoot = self.__currentMmpFile
@@ -2198,18 +2203,21 @@
self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_REQUESTEDTARGETEXT", self.__TARGETEXT.lower()))
# Create Capability variable in one SET operation (more efficient than multiple appends)
- self.BuildVariant.AddOperation(raptor_data.Set("CAPABILITY"," ".join(self.capabilities)))
+
+ self.BuildVariant.AddOperation(raptor_data.Set("CAPABILITY","".join(self.capabilities)))
# Resolve combined capabilities as hex flags, for configurations that require them
capabilityFlag1 = 0
capabilityFlag2 = 0 # Always 0
- for capability in [c.lower() for c in self.capabilities]:
+ for capability in self.capabilities:
invert = 0
if capability.startswith('-'):
invert = 0xffffffff
- capability = capability.lstrip('-')
+ capability = capability[1:]
+ elif capability.startswith('+'):
+ capability = capability[1:]
if MMPRaptorBackend.supportedCapabilities.has_key(capability):
capabilityFlag1 = capabilityFlag1 ^ invert