350f9d4bf4d54cf6475e359bf818645bc713dc2e
[AGL/meta-agl.git] / meta-agl-bsp / recipes-kernel / kern-tools-native / files / 0001-merge_config.sh-add-CR-after-fragment.patch
1 From 8d12bbfc6179d7e9777e4663e10f1795de158b57 Mon Sep 17 00:00:00 2001
2 From: Stephane Desneux <stephane.desneux@iot.bzh>
3 Date: Tue, 5 Jun 2018 10:53:24 +0200
4 Subject: [PATCH] tools/merge_config.sh: add CR after each fragment
5
6 If a fragment file doesn't contain a CR at the end, two config options
7 may be merged on the same line in the result file, leading to misconfiguration.
8
9 This patch adds a CR after each fragment to ensure that config options
10 are well separated in the result file.
11
12 Bug-AGL: SPEC-1475
13
14 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
15 ---
16  tools/merge_config.sh | 2 ++
17  1 file changed, 2 insertions(+)
18
19 diff --git a/tools/merge_config.sh b/tools/merge_config.sh
20 index 67d1314..296e759 100755
21 --- a/tools/merge_config.sh
22 +++ b/tools/merge_config.sh
23 @@ -129,6 +129,8 @@ for MERGE_FILE in $MERGE_LIST ; do
24                 sed -i "/$CFG[ =]/d" $TMP_FILE
25         done
26         cat $MERGE_FILE >> $TMP_FILE
27 +       # workaround for fragments not ending with carriage return
28 +       echo >> $TMP_FILE
29  done
30  
31  if [ "$RUNMAKE" = "false" ]; then
32 -- 
33 2.1.4
34