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>.