FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 04-21-2010, 01:19 PM
Andy Whitcroft
 
Default UBUNTU: tools -- fix perf version extraction for multi-part flavours

Currently, the perf tool doesn't work for the generic-pae flavour:

$ bash -x /usr/bin/perf
++ uname -r
+ version=2.6.32-21-generic-pae
+ version=2.6.32-21-generic
+ exec perf_2.6.32-21-generic
/usr/bin/perf: line 4: exec: perf_2.6.32-21-generic: not found

We can work out the flavour by removing the known shaped version-abi
combination from the start of the version string (which is two lots of
*-), and then remove this flavour suffix from the original version to
leave us with the version-abi we need.

Based on a patch by Jeremy Kerr <jeremy.kerr@canonical.com>.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
debian/tools/perf | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/debian/tools/perf b/debian/tools/perf
index 1a9915f..79253d2 100644
--- a/debian/tools/perf
+++ b/debian/tools/perf
@@ -1,4 +1,7 @@
#!/bin/bash
version=`uname -r`
-version=${version%-*}
+flavour=${version#*-}
+flavour=${flavour#*-}
+version=${version%-$flavour}
+
exec "perf_$version" "$@"
--
1.7.0.4


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 09:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org