[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 (label == '*') or (label in self.target_labels):
# Parse out features
if 'features' in overrides:
features = overrides['features']
self.remove_features(list(set(self.added_features) - set(features)))
if 'target.features' in overrides:
features = overrides['target.features']
self.remove_features(self.added_features - set(features))
self.add_features(features)
self.removed_unecessary_features = True
del overrides['features']
del overrides['target.features']
if 'features_add' in overrides:
self.add_features(overrides['features_add'])
del overrides['features_add']
if 'target.features_add' in overrides:
self.add_features(overrides['target.features_add'])
del overrides['target.features_add']
if 'features_remove' in overrides:
self.remove_features(overrides['features_remove'])
del overrides['features_remove']
if 'target.features_remove' in overrides:
self.remove_features(overrides['target.features_remove'])
del overrides['target.features_remove']
# Consider the others as overrides
for name, v in overrides.items():

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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