tizen-distro: be more careful when importing patches
authorPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 15:05:46 +0000 (07:05 -0800)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:10:33 +0000 (08:10 -0800)
The combo-layer hooks for bitbake and meta-tizen patch the Subject
line of patches. This change must be limited to the Subject of
the main patch itself, in particular patches embedded in the patch
must not be changed.

Achieved by limiting the replacement to the lines until the first
Subject in the patch.

Found when importing meta-tizen and diffing against a direct copy
of the final revision.

conf/combo-layerhook-bitbake.sh
conf/combo-layerhook-meta-tizen.sh

index ba8dd50..7b8cb8f 100755 (executable)
@@ -9,5 +9,5 @@ patchfile=$1
 rev=$2
 reponame=$3
 
-sed -i -e "s#Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] bitbake: \1#" $patchfile
+sed -i -e "0,/^Subject:/s#Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] bitbake: \1#" $patchfile
 sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(Bitbake rev: $rev\)\n\n\1#" $patchfile
index e868aaa..1f80791 100755 (executable)
@@ -14,7 +14,7 @@ reponame=$3
 # it appears in both meta-tizen (as .bbappend file) and other
 # components (as .bb file). Therefore always add the "meta-tizen"
 # prefix.
-sed -i -e "s#Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] meta-tizen: \1#" $patchfile
+sed -i -e "0,/^Subject:/s#Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] meta-tizen: \1#" $patchfile
 
 if grep -q '^Signed-off-by:' $patchfile; then
     sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From meta-tizen rev: $rev\)\n\n\1#" $patchfile