From 88c721f1dee7aec217674fd707366dadb1c0f033 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 9 Jan 2015 07:05:46 -0800 Subject: [PATCH] tizen-distro: be more careful when importing patches 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 | 2 +- conf/combo-layerhook-meta-tizen.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/combo-layerhook-bitbake.sh b/conf/combo-layerhook-bitbake.sh index ba8dd50..7b8cb8f 100755 --- a/conf/combo-layerhook-bitbake.sh +++ b/conf/combo-layerhook-bitbake.sh @@ -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 diff --git a/conf/combo-layerhook-meta-tizen.sh b/conf/combo-layerhook-meta-tizen.sh index e868aaa..1f80791 100755 --- a/conf/combo-layerhook-meta-tizen.sh +++ b/conf/combo-layerhook-meta-tizen.sh @@ -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 -- 2.7.4