bash-completion looks up tools in wrong directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
valgrind (Debian) |
Fix Released
|
Unknown
|
|||
valgrind (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: valgrind
I filed this bug under valgrind because valgrind installs /etc/bash_
$ 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~
Candidate: 1:3.6.0~
Version table:
*** 1:3.6.0~
500 http://
100 /var/lib/
$ 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://
100 /var/lib/
When I try to use tab to complete valgrind tool names bash-completion spits out find errors
$ valgrind --tool=^Ifind: `/usr/lib/
find: `/usr/lib/
find: `/usr/lib/
find: `/usr/lib/
$ ls --file-type /usr/lib/valgrind/
cachegrind-
cachegrind-
callgrind-
callgrind-x86-linux libcoregrind-
debian-
debian.supp libreplacemallo
default.supp libreplacemallo
drd-amd64-linux libvex-
drd-x86-linux libvex-x86-linux.a vgpreload_
exp-bbv-amd64-linux massif-amd64-linux vgpreload_
exp-bbv-x86-linux massif-x86-linux vgpreload_
exp-ptrcheck-
exp-ptrcheck-
helgrind-
As you can see there is no x86 directory inside /usr/lib/valgrind/
summary: |
- Error completing valgrind tools + bash-completion looks up tools in wrong directory |
Changed in valgrind (Ubuntu): | |
status: | New → Confirmed |
tags: | added: patch |
Changed in valgrind (Debian): | |
status: | Unknown → Fix Released |
This is a relatively simple fix.
Replace line 67 with this line according to your architecture:
x86 (32bit):
tools= `find /usr/lib/ valgrind/ *-x86-linux -executable -type f -exec basename {} -x86-linux \; | sed -e 's,\./,,g' | tr '\n' ' '`
x86_64 (64bit):
tools= `find /usr/lib/ valgrind/ *-amd64- linux -executable -type f -exec basename {} -amd64-linux \; | sed -e 's,\./,,g' | tr '\n' ' '`
This will result:
$ valgrind --tool=
cachegrind drd exp-ptrcheck lackey memcheck
callgrind exp-bbv helgrind massif none