Patchwork perf: Refactor code so it is easier to read

login
register
mail settings
Submitter Otavio Salvador
Date Sept. 13, 2012, 8:32 p.m.
Message ID <1347568349-28024-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/36505/
State New
Headers show

Comments

Otavio Salvador - Sept. 13, 2012, 8:32 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-kernel/perf/perf_3.4.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Otavio Salvador - Sept. 13, 2012, 8:38 p.m.
On Thu, Sep 13, 2012 at 5:32 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  meta/recipes-kernel/perf/perf_3.4.bb |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Please ignore this patch ...
Saul Wold - Sept. 13, 2012, 8:40 p.m.
On 09/13/2012 01:32 PM, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>   meta/recipes-kernel/perf/perf_3.4.bb |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
> index decc911..6e1c746 100644
> --- a/meta/recipes-kernel/perf/perf_3.4.bb
> +++ b/meta/recipes-kernel/perf/perf_3.4.bb
> @@ -74,7 +74,7 @@ do_compile() {
>   do_install() {
>   	oe_runmake DESTDIR=${D} install
>   	# we are checking for this make target to be compatible with older perf versions
> -	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0"]; then
> +	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && ! grep -q install-python_ext ${S}/tools/perf/Makefile  ]; then

Is this missing a [ or is there an extra ]?

Also is that dash compliant?

And of course you need a PR bump (well maybe not in this case)


Sau!

>   		oe_runmake DESTDIR=${D} install-python_ext
>   	fi
>   }
>
Saul Wold - Sept. 13, 2012, 8:40 p.m.
On 09/13/2012 01:38 PM, Otavio Salvador wrote:
> On Thu, Sep 13, 2012 at 5:32 PM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>   meta/recipes-kernel/perf/perf_3.4.bb |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> Please ignore this patch ...
>
Too late!

Patch

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index decc911..6e1c746 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -74,7 +74,7 @@  do_compile() {
 do_install() {
 	oe_runmake DESTDIR=${D} install
 	# we are checking for this make target to be compatible with older perf versions
-	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0"]; then
+	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && ! grep -q install-python_ext ${S}/tools/perf/Makefile  ]; then
 		oe_runmake DESTDIR=${D} install-python_ext
 	fi
 }