From: Paul Eggleton Date: Tue, 23 Aug 2011 18:56:28 +0000 (+0100) Subject: scripts/combo-layer: fix overzealous regex in default hook script X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~44417 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7aae45414e4597e9244f86a81fbc940f73785c8;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git scripts/combo-layer: fix overzealous regex in default hook script 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 --- diff --git a/scripts/combo-layer-hook-default.sh b/scripts/combo-layer-hook-default.sh index f03c4fa80f8..e535d5f4cc3 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\] \(.*\)#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