/etc/bash_completion reports script as being in the wrong location

Bug #109927 reported by Robert
4
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

My description verbatim from a post to the EdLUG e-mail list:

> Second, and possibly related weirdness, is that I've got a shell script with
> read and execute perms in /usr/local/bin. My PATH contains /usr/local/bin,
> and I can get the name of the script using command-completion.
>
> But when I execute it, I get the following from bash:
>
> bash: /usr/bin/proofgeneral: No such file or directory
>
> I've checked, it's just not executing the script. I think that the
> command-completion part is telling bash that it's in /usr/bin, rather than
> where it really is.
>
> Thing is that other scripts in /usr/local/bin do not have this problem. (One
> of them is a script that runs Proof General.)
>
> If I give the fill path, /usr/local/bin/proofgeneral, then it runs fine.

As it turns out, commenting-out the use of /etc/bash_completion in my .bashrc file fixes this.

Here's the kicker: I'm not even using completion. I just type in the full name, and bash_completion mucks it up somewhere and says that it's in a different location.

FYI, the version of ProofGeneral that I cam using comes from
 http://www.cl.cam.ac.uk/research/hvg/Isabelle/installation.html#install_linux
and I've installed it in /usr/local/share.

Revision history for this message
Robert (robrwo) wrote :

I forgot to add that if I sudo, then it works fine. Presumably because arguments to sudo are handled differently, not because this is a permissions issue.

Revision history for this message
Johnathon (kirrus) wrote :

Did this problem start with the upgrade to Feisty? I've noticed a similar thing on our machines during a move to Feisty, .desktop file references failing to find shell scripts in /usr/local/bin.

Revision history for this message
Robert (robrwo) wrote :

I've only first noticed it to submit a big for Feisty. Since I'm using Feisty from a reinstall rather than upgrade, I don't know for sure.

I did notice the version of ProofGeneral (too old for my needs) included in the distribution installs the script in /usr/bin rather than /use/local/bin.

For whatever reason, it now works (I can run proofgeneral from /use/local/bin). So this is a transient error (which I find more disturbing in that I don't know why it didn't work before, or whether it will continue to work).

Revision history for this message
Johnathon (kirrus) wrote :

The words "transient error" strikes fear into the hearts of any software developer. I'm afraid, I can't help debug this one :(

Revision history for this message
Johnathon (kirrus) wrote :

Has this come up again, or is it not a problem now?

Revision history for this message
Robert (robrwo) wrote :

I've not noticed it coming up again, but the version of proofgeneral that I'm using now is installed in /usr instead of /use/local.

Revision history for this message
Johnathon (kirrus) wrote :

Ok, I'm going to close the bug. If it comes up again, feel free to re-open it. Thanks for the bug report.

Changed in bash:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.