aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2017-01-26 18:15:38 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-01-27 01:04:01 +0000
commit94bbb1e9719ddca56db6d03d16b024c8c7bffd33 (patch)
tree63c3340b87cc6b58b39dddebc0339c7e25c05795 /scripts
parent00fe48518f4ce3ec40af041e36bd2cb7c70e4271 (diff)
scripts/aglsetup: remove duplicate features before generating config
With features dependencies, it may happen that the final list of features to handle contains duplicates. With recent changes on configuration fragments, this produces some WARNINGS due to multiple inclusions of the same file in the generated local.conf . This commit cleans up the features list resolved internally by removing duplicates before generating local.conf Change-Id: I009c41108086e76b76272e62c8ba9101fcc45437 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/.aglsetup_genconfig.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/.aglsetup_genconfig.bash b/scripts/.aglsetup_genconfig.bash
index 285ecee50..af2b7473b 100755
--- a/scripts/.aglsetup_genconfig.bash
+++ b/scripts/.aglsetup_genconfig.bash
@@ -324,8 +324,8 @@ for FEATURE in $FEATURES;do
TMP_FEATURES="$TMP_FEATURES $FEATURE"
TMP_FEATURES="$TMP_FEATURES $(find_feature_dependency $FEATURE $TMP_FEATURES)"
done
-FEATURES=$TMP_FEATURES
-echo "Features used: $FEATURES"
+# remove duplicate features if any
+FEATURES=$(for x in $TMP_FEATURES; do echo $x; done | sort -u | awk '{printf("%s ",$1);}')
# validate the features
for f in $FEATURES; do