Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 525132

Summary: app-shells/bash-completion-2.1-r2 - error message on new shell: "bash: /etc/bash_completion.d/mount.linux: no such file or directory"
Product: Gentoo Linux Reporter: i.Dark_Templar <idarktemplar>
Component: Current packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: RESOLVED OBSOLETE    
Severity: normal CC: admwiggin, ap, bertrand, chris, israel.lugo, mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description i.Dark_Templar 2014-10-12 10:57:47 UTC
I've upgraded bashcomp recently and now I'm getting on each new shell error message:
"bash: /etc/bash_completion.d/mount.linux: no such file or directory"

I'm using bashcomp globally.

Reproducible: Always

Steps to Reproduce:
1. emerge =app-shells/bashcomp-20121024
2. enable bashcomp
3. eselect bashcomp enable --global mount
4. eselect bashcomp disable --global mount.linux
5. start new bash shell
Actual Results:  
Error is printed to shell, twice:
"bash: /etc/bash_completion.d/mount.linux: no such file or directory"


Expected Results:  
No errors should be printed

if you enable mount.linux completion, error goes away:
eselect bashcomp disable --global mount.linux
Comment 1 i.Dark_Templar 2014-10-12 13:45:05 UTC
Sorry, I've written wrong package name.
equery b filename shows that these files belong to 'app-shells/bash-completion-2.1-r2'
Comment 2 Israel G. Lugo 2014-10-14 02:34:51 UTC
Confirm on app-shells/bash-completion-2.1-r2.

I believe it may be related to the following lines:

$ head /usr/share/bash-completion/mount
# mount(8) completion                                      -*- shell-script -*-

if [[ $OSTYPE == *linux* ]]; then
    . "$BASH_SOURCE.linux"
    return
fi


I haven't looked at the contents of BASH_SOURCE, but if it's /etc/bash_completion.d/mount, that explains why it's looking for /etc/bash_completion.d/mount.linux.

Doing eselect bashcomp enable mount.linux causes the error message to disappear; however, that's an ugly hack. The implementation detail of there being mount vs  mount.linux should remain hidden.
Comment 3 Teika kazura 2017-02-03 12:22:26 UTC
This bug is INVALID any more. mount* are not included in app-shells/bash-completion. See bug #579766.