[oe-commits] Patrick Ohly : combo-layer-hook-default.sh: beware of embedded patches

git at git.openembedded.org git at git.openembedded.org
Fri Mar 20 11:10:08 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 2737bd1c3f7c51dd6509a0f91337f695f9c69165
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=2737bd1c3f7c51dd6509a0f91337f695f9c69165

Author: Patrick Ohly <patrick.ohly at intel.com>
Date:   Fri Mar 13 12:57:16 2015 +0100

combo-layer-hook-default.sh: beware of embedded patches

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 at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 scripts/combo-layer-hook-default.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/combo-layer-hook-default.sh b/scripts/combo-layer-hook-default.sh
index 9dd5aed..46f2b70 100755
--- a/scripts/combo-layer-hook-default.sh
+++ b/scripts/combo-layer-hook-default.sh
@@ -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



More information about the Openembedded-commits mailing list