Subject: Re: [PATCH] completion: move out of contrib

From: Junio C Hamano <[email-masked]>
Date: Wed, 07 May 2014 10:37:21 -0700

Felipe Contreras <[email-masked]> writes:

> As an example of all the hacks needed by a real distribution package,
> here's the stuff ArchLinux packagers have to do:
>
>   # bash completion
>   mkdir -p "$pkgdir"/usr/share/bash-completion/completions/
>   install -m644 ./contrib/completion/git-completion.bash "$pkgdir"/usr/share/bash-completion/completions/git
>...
>
> And here's what debian packagers have to do:
>
>   # bash completion
>   install -d -m0755 '$(GIT)'/etc/bash_completion.d
>   install -m0644 contrib/completion/git-completion.bash \
>     '$(GIT)'/etc/bash_completion.d/git
>...
>
> If our build system was sane, they wouldn't need so many hacks.

I do not see how the above two examples lead to that conclusion.
How would it help to blindly install to $(sharedir), or suggestion
to use pkg-info when major distros do not even use one?

I would understand if the saneness you seek were for distros to
agree on where things should go, or at least agree on how to find
out where things should go.

The situation for completion scripts unfortunately has to be even
worse than others (like gitweb) in that distros, in order to serve
users (not upstream projects) better, want to package various pieces
of completion scripts from different projects into a location their
bash-completion package wants to see.  I applaud their effort and I
wish that projects they pull various completion scriptlets from can
do more to help them, but I do not think a single makefile target to
unconditionally install to $(sharedir) is it, and honestly speaking,
the distro completion packagers could do more to help us projects to
help them by at least agreeing on how to find out where they want to
see our completion scripts installed.

I do not think we are there yet.