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

Lee Jones lee.jones at canonical.com
Tue Jun 1 10:44:35 UTC 2010


On 27/05/10 17:13, Tim Gardner wrote:
> On 05/27/2010 09:05 AM, Lee Jones wrote:
>> Hi Tim,
>>
>> Is this the kind of thing you're after?
>>
>> The following changes since commit
>> f0819aaf4948e34a44d9d685615ddee74271cd70:
>>    Chase Douglas (1):
>>          UBUNTU: enforce CONFIG_TMPFS_POSIX_ACL=y
>>
>> are available in the git repository at:
>>
>>    git://kernel.ubuntu.com/lag/ubuntu-lucid.git lp570500
>>
>> Lee Jones (1):
>>        UBUNTU: Enable perf to be more helpful when perf_<version>  does
>> not exist.
>>
>>   debian/tools/perf |   19 ++++++++++++++-----
>>   1 files changed, 14 insertions(+), 5 deletions(-)
>>
>> Kind regards,
>> Lee
>>
>>
>
> 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.
>
> ----------------
> #!/bin/bash
> full_version=`uname -r`
>
> # 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" "$@"
> ----------------
>
> I find the variable naming a bit confusing.
> 'version=${full_version%-$flavour}' doesn't do what it purports,
> though it does work. Perhaps some clarification?
>

That line removes the '-' and the flavour (e.g. 'server' or 'generic') from the full version, so from 2.6.32-22-server we get '2.6.32-22' in this instance.

Kind regards,
Lee






More information about the kernel-team mailing list