The package uses constant bashcompdir at /usr/share/bash-completion. However, as of app-shells/bash-completion-2.1-r1 the bashcompdir has changed and this is no longer valid. Please fix your ebuild to inherit bash-completion-r1 and use its $(get_bashcompdir) function. This will make the ebuild compliant both with the old and the new install location.
Fixed, thanks for the explanation. +*cdemu-2.1.0-r1 (19 Jul 2013) + + 19 Jul 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + +cdemu-2.1.0-r1.ebuild, +files/cdemu-2.1.0-bash-completion-dir.patch: + Do not use a hard-coded completion directory to fix compatibility with + bash-completion-2.1-r1 (bug #477378, thanks to Michał Górny).
Completion script is named "cdemu-client", so it will not get loaded by bash-completion-2.1-r1. It should be renamed to "cdemu", or leaved in compatdir (/etc/bash_completion.d).
(In reply to Alexander Tsoy from comment #2) > Completion script is named "cdemu-client", so it will not get loaded by > bash-completion-2.1-r1. It should be renamed to "cdemu", or leaved in > compatdir (/etc/bash_completion.d). Explain please.
bash-completion-2.1-r1 itself installs 46 different files with "-" in their filename into /usr/share/bash-completion/completions
(In reply to Alexandre Rostovtsev from comment #3) From the README: Q. I author/maintain package X and would like to maintain my own completion code for this package. Where should I put it to be sure that interactive bash shells will find it and source it? Install it in one of the directories pointed to by bash-completion's pkgconfig file variables. There are two alternatives: the recommended one is 'completionsdir' (get it with "pkg-config --variable=completionsdir bash-completion") from which completions are loaded on demand based on invoked commands' names, so be sure to name your completion file accordingly, and to include for example symbolic links in case the file provides completions for more than one command. The other one which is present for backwards compatibility reasons is 'compatdir' (get it with "pkg-config --variable=compatdir bash-completion") from which files are loaded when bash_completion is loaded.
Also you can look how the finction _completion_loader() is used in /usr/share/bash-completion/bash_completion.
(In reply to Alexandre Rostovtsev from comment #4) > bash-completion-2.1-r1 itself installs 46 different files with "-" in their > filename into /usr/share/bash-completion/completions If completion is installed in completionsdir, then its name must match command name. Symbol "-" is not a problem.
Fixed, thanks. +*cdemu-2.1.0-r2 (19 Jul 2013) + + 19 Jul 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + +cdemu-2.1.0-r2.ebuild, -cdemu-2.1.0-r1.ebuild, + files/cdemu-2.1.0-bash-completion-dir.patch: + Fix completion filename for bash-completion-2.1-r1 (bug #477378, thanks to + Alexander Tsoy).