[PATCH] UBUNTU: Enable perf to be more helpful when perf_<version> does not exist.

Leann Ogasawara leann.ogasawara at canonical.com
Tue Jun 1 16:52:13 UTC 2010


On Tue, 2010-06-01 at 11:47 +0100, Lee Jones wrote:
> > The pull request is correct. For most patches (except the truly
> > gargantuan ones) I attach or inline so that patchwork detects it as a
> > patch which makes the release maintainers job easier.

Hi Lee,

Based on the nominations in the bug report, I assume this patch is
intended for both Maverick and Lucid.

And just a small tweak noted below. . .

> commit 8a2775c937d9349e8c7ccb915a3d2b134c13f09b
> Author: Lee Jones <lee.jones at canonical.com>
> Date:   Tue May 25 11:49:32 2010 +0100
> 
>     UBUNTU: Enable perf to be more helpful when perf_<version> does not
> exist.
>    
>     http://bugs.launchpad.net/bugs/570500

This should be:

BugLink: http://bugs.launchpad.net/bugs/570500

The launchpad janitor parses for the above syntax and will auto close
the bug when the fix is uploaded.

Thanks,
Leann

>    
>     Signed-off-by: Lee Jones <lee.jones at canonical.com>
> 
> 
> diff --git a/debian/tools/perf b/debian/tools/perf
> index 79253d2..ab35fab 100644 (file)
> --- a/debian/tools/perf
> +++ b/debian/tools/perf
> @@ -1,7 +1,16 @@
>  #!/bin/bash
> -version=`uname -r`
> -flavour=${version#*-}
> -flavour=${flavour#*-}
> -version=${version%-$flavour}
> +full_version=`uname -r`
>  
> -exec "perf_$version" "$@"
> +# Removing flavour from version i.e. generic or server.
> +flavour_abi=${full_version#*-}
> +flavour=${flavour_abi#*-}
> +version=${full_version%-$flavour}
> +perf="perf_$version"
> +
> +if ! which "$perf" > /dev/null; then
> +    echo "$perf not found" >&2
> +    echo "You may need to install linux-tools-$version" >&2
> +    exit 2
> +fi
> +
> +exec "$perf" "$@"
> 
> Hopefully this is better.
> 
> Kind regards,
> Lee
> 






More information about the kernel-team mailing list