diff mbox

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

Message ID 4C0E4712.3060905@canonical.com
State Accepted
Delegated to: Stefan Bader
Headers show

Commit Message

Lee Jones June 8, 2010, 1:35 p.m. UTC
Hi all,

This patch as already been excepted in Maverick.

I would also like it to go into Lucid.

The following changes since commit f8b7e92f771b23dafe40a6a1080cd89a3187628e:
  Jerome Glisse (1):
        (pre-stable) drm/radeon/kms: initialize set_surface_reg reg for rs600 asic

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

Comments

Lee Jones June 8, 2010, 2:12 p.m. UTC | #1
Just noticed:

>   git://kernel.ubuntu.com/lag/ubuntu-lucid.git lp570500

BugLink: git://kernel.ubuntu.com/lag/ubuntu-lucid.git lp570500
Stefan Bader June 8, 2010, 3:22 p.m. UTC | #2
On 06/08/2010 04:12 PM, Lee Jones wrote:
> Just noticed:
> 
>>   git://kernel.ubuntu.com/lag/ubuntu-lucid.git lp570500
> 
> BugLink: git://kernel.ubuntu.com/lag/ubuntu-lucid.git lp570500
> 
> 
How about BugLink: http://bugs.launchpad.net/bugs/570500 ? ;-)
Stefan Bader June 9, 2010, 6:45 a.m. UTC | #3
The change will more or less only affect the error case. It has been tested in
Maverick. So regression potential is low.

Acked-by: Stefan Bader <stefan.bader@canonical.com>

On 06/08/2010 03:35 PM, Lee Jones wrote:
> Hi all,
> 
> This patch as already been excepted in Maverick.
> 
> I would also like it to go into Lucid.
> 
> The following changes since commit f8b7e92f771b23dafe40a6a1080cd89a3187628e:
>   Jerome Glisse (1):
>         (pre-stable) drm/radeon/kms: initialize set_surface_reg reg for rs600 asic
> 
> 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(-)
> 
> 
> 
> 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" "$@"
> 
> Kind regards,
> Lee
>
Tim Gardner June 9, 2010, 12:41 p.m. UTC | #4
On 06/08/2010 07:35 AM, Lee Jones wrote:
> Hi all,
>
> This patch as already been excepted in Maverick.
>
> I would also like it to go into Lucid.
>
> The following changes since commit f8b7e92f771b23dafe40a6a1080cd89a3187628e:
>    Jerome Glisse (1):
>          (pre-stable) drm/radeon/kms: initialize set_surface_reg reg for rs600 asic
>
> 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(-)
>
>
>
> 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" "$@"
>
> Kind regards,
> Lee
>

Acked-by: Tim Gardner <tim.gardner@canonical.com>
diff mbox

Patch

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" "$@"