]> code.ossystems Code Review - openembedded-core.git/commitdiff
combo-layer-hook-default.sh: beware of embedded patches
authorPatrick Ohly <patrick.ohly@intel.com>
Fri, 13 Mar 2015 11:57:16 +0000 (12:57 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Mar 2015 11:03:10 +0000 (11:03 +0000)
Patching the subject line must be limited to the subject of
the main patch itself. In particular, git formatted patches embedded in the patch must not be changed.

Achieved by limiting the replacement to the lines until the first
subject in the patch, just as it is done for modifying the first
Signed-off-by.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/combo-layer-hook-default.sh

index 9dd5aedb00f7698c3f7830a094acee23e4ab0a20..46f2b70fc46b3606199b759aa40d4470448fca1d 100755 (executable)
@@ -9,5 +9,5 @@ patchfile=$1
 rev=$2
 reponame=$3
 
-sed -i -e "s#^Subject: \[PATCH\] \($reponame: \)*\(.*\)#Subject: \[PATCH\] $reponame: \2#" $patchfile
+sed -i -e "0,/^Subject:/s#^Subject: \[PATCH\] \($reponame: \)*\(.*\)#Subject: \[PATCH\] $reponame: \2#" $patchfile
 sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\($reponame rev: $rev\)\n\n\1#" $patchfile