[pulseaudio-discuss] [PATCH] build-sys: Install bash completion to where bash-completion.pc says

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Thu Jan 29 11:34:50 PST 2015

On Thu, 2015-01-29 at 14:59 +0200, Ville Skyttä wrote:
> On Thu, Jan 29, 2015 at 2:14 PM, Tanu Kaskinen
> <tanu.kaskinen at linux.intel.com> wrote:
> > On Sun, 2015-01-25 at 13:42 +0200, Ville Skyttä wrote:
> >> Fall back to the previous /etc/bash_completion.d dir on failures
> >> (either old bash completion or not installed).
> >>
> >> Signed-off-by: Ville Skyttä <ville.skytta at iki.fi>
> >> ---
> >>  Makefile.am  | 2 +-
> >>  configure.ac | 6 ++++++
> >>  2 files changed, 7 insertions(+), 1 deletion(-)
> >
> > Thanks for the patch! We already have an earlier proposal, though:
> > https://bugs.freedesktop.org/show_bug.cgi?id=84921
> >
> > As I explained in the bug, I don't like using bash-completion.pc,
> > because it will give a directory that will make us overwrite distro
> > files,
> It's not quite that clear cut. If installing on a system that has
> bash-completion built and installed from source without any special
> settings given, it will give a /usr/local directory for installing
> completions, specifically
> /usr/local/share/bash-completion/completions.

I don't know what point you're trying to make here - it's fine if
locally installed bash-completion gives a directory under /usr/local in
its .pc file. Do you see some problem with that?

> In any case, it will give the *correct* directory where to install the
> completions to. If we (we = bash-completion) did have support for both
> let's say /usr/share and /usr/local/share bash completions dirs, we'd
> want to expose both of those through our *.pc and have people use it
> to get the locations, but they'd need to be two variables and how
> would the build system of let's say pulseaudio know which one to use
> (assuming it wouldn't be asked from the user)?

Why would you want to expose /usr/local/share in your .pc file? Zsh
doesn't do that, and everything works great...

> Anyway, I don't think the possibility to install into system locations
> if bash-completion.pc so says is an issue (and in any case it's a
> smaller problem than installing into the deprecated and eagerly loaded
> /etc/bash_completion.d), and I'm not convinced that adding another dir
> where to load them from would be a clear improvement overall.

Fixing the default location to be something else
than /etc/bash_completion.d is very welcome, but that's a separate

Whether to add another directory to the completion search path or not is
something that the bash-completion folks have to decide. If they (you?)
decide that /usr/local won't be added to the default search path, then
we have to make a decision in PulseAudio: either we overwrite
distribution files and Bash completion will work with default
configuration, or we don't overwrite distribution files and Bash
completion won't work with default configuration. My choice is to not
overwrite distribution files. A warning could be printed if
bash-completion.pc is available and it gives a different directory than
what PulseAudio is configured with.

> By the way, where to load completions from is a bash-completion (not
> bash) thing, they're separate projects.

Thanks for the information, I didn't know that.


More information about the pulseaudio-discuss mailing list