[build tools] Added proper namespace for features

per @bogdanm
pull/1940/head
Christopher Haster 2016-06-15 10:25:31 -05:00
parent 99ed4e03f1
commit 0d9d4639cd
15 changed files with 24 additions and 24 deletions

View File

@ -249,20 +249,20 @@ class Config:
# If the label is defined by the target or it has the special value "*", process the overrides # If the label is defined by the target or it has the special value "*", process the overrides
if (label == '*') or (label in self.target_labels): if (label == '*') or (label in self.target_labels):
# Parse out features # Parse out features
if 'features' in overrides: if 'target.features' in overrides:
features = overrides['features'] features = overrides['target.features']
self.remove_features(list(set(self.added_features) - set(features))) self.remove_features(self.added_features - set(features))
self.add_features(features) self.add_features(features)
self.removed_unecessary_features = True self.removed_unecessary_features = True
del overrides['features'] del overrides['target.features']
if 'features_add' in overrides: if 'target.features_add' in overrides:
self.add_features(overrides['features_add']) self.add_features(overrides['target.features_add'])
del overrides['features_add'] del overrides['target.features_add']
if 'features_remove' in overrides: if 'target.features_remove' in overrides:
self.remove_features(overrides['features_remove']) self.remove_features(overrides['target.features_remove'])
del overrides['features_remove'] del overrides['target.features_remove']
# Consider the others as overrides # Consider the others as overrides
for name, v in overrides.items(): for name, v in overrides.items():

View File

@ -1,7 +1,7 @@
{ {
"target_overrides": { "target_overrides": {
"*": { "*": {
"features": ["IPV4", "IPV6"] "target.features": ["IPV4", "IPV6"]
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "lib1", "name": "lib1",
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV4"] "target.features_add": ["IPV4"]
} }
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV6"] "target.features_add": ["IPV6"]
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "lib1", "name": "lib1",
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV4"] "target.features_add": ["IPV4"]
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "lib2", "name": "lib2",
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_remove": ["IPV4"] "target.features_remove": ["IPV4"]
} }
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV6"] "target.features_add": ["IPV6"]
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "lib1", "name": "lib1",
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV6"] "target.features_add": ["IPV6"]
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "lib2", "name": "lib2",
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["UVISOR"] "target.features_add": ["UVISOR"]
} }
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV4"] "target.features_add": ["IPV4"]
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "lib1", "name": "lib1",
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV6"] "target.features_add": ["IPV6"]
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "lib2", "name": "lib2",
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["UVISOR"] "target.features_add": ["UVISOR"]
} }
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"target_overrides": { "target_overrides": {
"*": { "*": {
"features": ["IPV4", "IPV6"] "target.features": ["IPV4", "IPV6"]
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "lib1", "name": "lib1",
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV6"] "target.features_add": ["IPV6"]
} }
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"target_overrides": { "target_overrides": {
"*": { "*": {
"features_add": ["IPV4"], "target.features_add": ["IPV4"],
"lib2.test": "GOOD" "lib2.test": "GOOD"
} }
} }