On 07 Feb 2018, Gabriel F. T. Gomes wrote:

>I haven't made any changes to bash-completion that would address what's
>reported in this bug, because I think it has already been solved by
>668254 (NMU for bash-completion 2.1-4.2).

Short explanation:

This is not a problem in bash-completion, so I'll close this bug (after
opening a new bug to each of the packages that currently install files
to the obsolete directory (/etc/bash_completion.d/).

Long explanation:

I have investigated this problem a bit further, and I have reached the
conclusion that this is *not* a problem in bash_completion.  Here's the
rationale for my assessment...

Many packages are marked as being _affected_ by this bug.  Some, such
as dkms, git, and grub2 (grub-common) still install completion files
into the obsolete directory (/etc/bash_completion.d/).  Others, such as
scilab-cli, don't.  Others might or might not still do this, but I
haven't checked them all yet.

For scilab-cli, I have verified that it does *not* have the problem,
by: installing it, then using `dpkg -L', similarly to how Shirish
Agarwal did, to list the files:

    # aptitude install scilab-cli
    # dpkg -L scilab-cli | grep completion
    /usr/share/bash-completion
    /usr/share/bash-completion/completions
    /usr/share/bash-completion/completions/scilab (OK)

For dkms, git, and grub2, I also used `dpkg -L' to list the installed
files, and verified that they indeed use the obsolete directory:

    # dpkg -L dkms git grub-common | grep completion
    /etc/bash_completion.d
    /etc/bash_completion.d/dkms (NOT OK)
    /etc/bash_completion.d
    /etc/bash_completion.d/git-prompt (NOT OK)
    /usr/share/bash-completion
    /usr/share/bash-completion/completions
    /usr/share/bash-completion/completions/git (OK)
    /usr/share/bash-completion/completions/gitk (OK)
    /etc/bash_completion.d
    /etc/bash_completion.d/grub (NOT OK)

In order to understand the cause of this problem, I downloaded the
source files for these packages, and noticed that they do *not* use
`dh_bash-completion' to install their completions files.  Instead, each
of them use their own methods, and have the obsolete path hardcoded.

For dkms, upstream has the path hardcoded:

    $ dget http://http.debian.net/debian/pool/main/d/dkms/dkms_2.6.1-1.dsc
    $ ggrep "completion\.d" dkms-2.6.1/
    dkms-2.6.1/Makefile:16:BASHDIR = $(DESTDIR)/etc/bash_completion.d

For git, a `.install' file has the path hardcoded:

    $ dget http://http.debian.net/debian/pool/main/g/git/git_2.19.1-1.dsc
    $ ggrep "completion\.d" git-2.19.1/
    [...]
    git-2.19.1/debian/git.install:4:debian/git-prompt.completion => 
etc/bash_completion.d/git-prompt

For grub2, likewise:

    $ dget 
http://http.debian.net/debian/pool/main/g/grub2/grub2_2.02+dfsg1-8.dsc
    $ ggrep "completion\.d" grub2-2.02+dfsg1/
    [...]
    grub2-2.02+dfsg1/debian/grub-common.install.in:5:etc/bash_completion.d

None of them use dh_bash-completion, which would do the right thing:

    $ ggrep "dh_bash" dkms-2.6.1/ git-2.19.1/ grub2-2.02+dfsg1/
    (no output)

For the reasons presented above, I'll mark this bug as closed, because
there's nothing that bash-completion can do about it.  Before I
actually do that, I'll open a bug report against packages listed as
_affected_ by this bug, but only to those that actually install
completion files in the obsolete path (for instance: dkms, but not
scilab-cli).

If someone believe that I got this wrong, feel free to reopen the bug.


Cheers,
Gabriel

Reply via email to