]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/combo-layer: fix overzealous regex in default hook script
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 23 Aug 2011 18:56:28 +0000 (19:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 24 Aug 2011 01:32:24 +0000 (18:32 -0700)
combo-layer's hook scripts are intended to modify patches as they pass
through; the default one adds a prefix with the component name and
a line with the component repo revision before the Signed-off-by;
however the script was also unintentionally modifying the contents of
patches *within* the patches passing through it, which resulted in
unexpected failures when the combo-layer script attempted to use
"git am" to apply them.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
scripts/combo-layer-hook-default.sh

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