Package: bash-completion
Version: 1:2.1-2
Severity: normal

After bash-completion is removed, opening bash triggers "bash: 
/usr/share/bash-completion/bash_completion: No such file or directory" unless it's 
started with --norc. The reason is the following part of /etc/skel/.bashrc:

if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

/usr/share/bash-completion/bash_completion is removed when bash-completion is 
removed, but the error strangely displays despite the test. After 
investigating, I understood that the elif is responsible for the error, since 
/etc/bash_completion's contents are:
. /usr/share/bash-completion/bash_completion

/etc/bash_completion should surely verify that 
/usr/share/bash-completion/bash_completion exists before trying to source it.

This does not happen if bash-completion is purged.

While we're at it, the current design doesn't strike as optimal. Shouldn't 
.bashrc simply source /etc/bash_completion, which already takes care of 
sourcing /usr/share/bash-completion/bash_completion ?

--- System information. ---
Architecture: i386
Kernel: Linux 3.12-1-amd64

Debian Release: jessie/sid
990 testing debian.mirror.iweb.ca
500 unstable debian.mirror.iweb.ca
1 experimental ftp3.nrc.ca

--- Package information. ---
Depends (Version) | Installed
======================-+-===========
bash (>= 3.2) | 4.2+dfsg-1


Package's Recommends field is empty.

Package's Suggests field is empty.

--
Filipus Klutiero
http://www.philippecloutier.com

_______________________________________________
Bash-completion-devel mailing list
Bash-completion-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel

Reply via email to