[Bug 531730] Re: bash-completion looks up tools in wrong directory
Lekensteyn
531730 at bugs.launchpad.net
Sat Sep 3 14:48:59 UTC 2011
The previous command did not work correctly for 64-bit systems since the 32-bit tools are provided too.
The attached patch fixes the directory and optimizes the command a bit:
By adding `-printf '%f '`, the next parts were obsolete / conflicting:
- `-exec basename {} \;` - this would get the basename, just like %f
- `sed -e 's,\./,,g'` - this is possibly a remainder before basename was available. It is supposed to remove all occurrences of ./
- `tr '\n' ' '` - this would join the lines with spaces, printf would not add a newline and the space after it works as well
If you've saved the patch as bash-completion-valgrind-tools.patch, you
can run the below command to apply it:
sudo patch -p0 < bash-completion-valgrind-tools.patch
** Patch added: "bash-completion-valgrind-tools.patch"
https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/531730/+attachment/2348951/+files/valgrind.patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to valgrind in Ubuntu.
https://bugs.launchpad.net/bugs/531730
Title:
bash-completion looks up tools in wrong directory
Status in “valgrind” package in Ubuntu:
Confirmed
Bug description:
Binary package hint: valgrind
I filed this bug under valgrind because valgrind installs
/etc/bash_completion.d/valgrind.
$ lsb_release -rd
Description: Ubuntu lucid (development branch)
Release: 10.04
$ uname -a
Linux barcelona 2.6.32-15-generic #22-Ubuntu SMP Tue Mar 2 02:23:29 UTC 2010 x86_64 GNU/Linux
$ apt-cache policy valgrind
valgrind:
Installed: 1:3.6.0~svn20100212-0ubuntu2
Candidate: 1:3.6.0~svn20100212-0ubuntu2
Version table:
*** 1:3.6.0~svn20100212-0ubuntu2 0
500 http://us.archive.ubuntu.com lucid/main Packages
100 /var/lib/dpkg/status
$ apt-cache policy bash-completion
bash-completion:
Installed: 1:1.1-3
Candidate: 1:1.1-3
Version table:
*** 1:1.1-3 0
500 http://us.archive.ubuntu.com lucid/main Packages
100 /var/lib/dpkg/status
When I try to use tab to complete valgrind tool names bash-completion spits out find errors
$ valgrind --tool=^Ifind: `/usr/lib/valgrind/x86-linux': No such file or directory
find: `/usr/lib/valgrind/x86-linux': No such file or directory
find: `/usr/lib/valgrind/x86-linux': No such file or directory
find: `/usr/lib/valgrind/x86-linux': No such file or directory
$ ls --file-type /usr/lib/valgrind/
cachegrind-amd64-linux helgrind-x86-linux none-x86-linux
cachegrind-x86-linux lackey-amd64-linux python.supp
callgrind-amd64-linux lackey-x86-linux vgpreload_core-amd64-linux.so
callgrind-x86-linux libcoregrind-amd64-linux.a vgpreload_core-x86-linux.so
debian-libc6-dbg.supp libcoregrind-x86-linux.a vgpreload_drd-amd64-linux.so
debian.supp libreplacemalloc_toolpreload-amd64-linux.a vgpreload_drd-x86-linux.so
default.supp libreplacemalloc_toolpreload-x86-linux.a vgpreload_exp-ptrcheck-amd64-linux.so
drd-amd64-linux libvex-amd64-linux.a vgpreload_exp-ptrcheck-x86-linux.so
drd-x86-linux libvex-x86-linux.a vgpreload_helgrind-amd64-linux.so
exp-bbv-amd64-linux massif-amd64-linux vgpreload_helgrind-x86-linux.so
exp-bbv-x86-linux massif-x86-linux vgpreload_massif-amd64-linux.so
exp-ptrcheck-amd64-linux memcheck-amd64-linux vgpreload_massif-x86-linux.so
exp-ptrcheck-x86-linux memcheck-x86-linux vgpreload_memcheck-amd64-linux.so
helgrind-amd64-linux none-amd64-linux vgpreload_memcheck-x86-linux.so
As you can see there is no x86 directory inside /usr/lib/valgrind/
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/531730/+subscriptions
More information about the foundations-bugs
mailing list