We use bash-completion eclass in sys-cluster/vzctl ebuild. It provides dobashcompletion() and bash-completion_pkg_postinst() which are very handy. But now we have changed vzctl build system so we can now enable/disable bash_completion installation, as well as the directory where bash-completion scripts are installed. We still like to use bash-completion_pkg_postinst(), but we need a directory where to install bashcomp scripts to. To my mind, having /usr/share/bash-completion hardcoded in vzctl ebuild is not the best idea. So, what could be useful in this case is function which will return bash-completion installation dir.
Well, eselect bashcomp is always going to look for these completion scripts in /usr/share/bash-completion unless the user sets EC_BASHCOMP_DIRS to override it. What exactly are you changing in vzctl?
vzctl's 'make install' installs its bashcomp file into /etc/bash_completion.d/. With Gentoo, I need to install it to /usr/share/bash-completion. The problem here is I want bash-completion.eclass to provide that path (/usr/share/bash-completion) in some way (say in a variable), so I will not need to hardcode it in vzctl ebuild. Hope that clarifies things.
So, instead of using dobashcompletion() from the vzctl.ebuild we want to use vzctl's own 'make install' -- and for that we need to know the path where we should install the bashcomp file to. If bash-completion eclass could provide this path (/usr/share/bash-completion) in some way that'd be great.
(In reply to comment #3) > So, instead of using dobashcompletion() from the vzctl.ebuild we want to use > vzctl's own 'make install' -- and for that we need to know the path where we > should install the bashcomp file to. If bash-completion eclass could provide > this path (/usr/share/bash-completion) in some way that'd be great. > Hi, I'm new to the b-c package and just reviewing the open bugs. If you still would like this done and can provide a patch, I will review it. thanks
Closing just because of no feedback.