Package: bash-completion
Version: 1:2.8-6
Severity: normal

I have a project for which I build Debian installation packages with the help 
of pbuilder. The packages are built for Debian OS

        * Jessie
        * Stretch
        * Buster

I have two different bash-completion scripts for two different command line 
tools for which I have two different installation path instruction files for 
each command line tool located in debian/:

        * debian/fsmd2-mtest.bash-completion
        * debian/fsmd2.bash-completion

Inside that two installation instruction files we have the following lines:

        $ cat debian/fsmd2.bash-completion 
        scripts/etc/bash_completion.d/fsmtool2-completion

        $ cat debian/fsmd2-mtest.bash-completion 
        scripts/etc/bash_completion.d/fsmtool2_mtest-completion

The completion scripts are located in the source tre as defined:

        $ ls -la scripts/etc/bash_completion.d/
        total 16
        drwxr-xr-x 2 pbuilder pbuilder 4096 May 18 15:26 .
        drwxr-xr-x 4 pbuilder pbuilder 4096 May 18 15:26 ..
        -rw-r--r-- 1 pbuilder pbuilder  933 May 18 15:26 fsmtool2-completion
        -rw-r--r-- 1 pbuilder pbuilder  980 May 18 15:26 
fsmtool2_mtest-completion


When I build the packages for Debian Jessie, everything works as expected, both 
completion scripts are installed into the path:

        $  ls -la /etc/bash_completion.d/
        total 24
        drwxr-xr-x  2 root root  4096 May 26 16:58 .
        drwxr-xr-x 92 root root  4096 May 18 12:12 ..
        -rw-r--r--  1 root root   933 May 18 17:26 fsmtool2-completion
        -rw-r--r--  1 root root   980 May 18 17:26 fsmtool2_mtest-completion


When I build the packages for Debian OS Stretch or Buster, bash-completion does 
not work for both command line tools any more cause the completion scripts are 
installed below:

        * /usr/share/bash-completion/completions/fsmtool2-completion 
        * /usr/share/bash-completion/completions/fsmtool2_mtest-completion 

I can reproduce it very easily without building the entire project by just 
invoking the dh_bash-completion helper in the source tree base directory:

        $ dh_bash-completion -v
                install -d debian/fsmd2/usr/share/bash-completion/completions
                installing scripts/etc/bash_completion.d/fsmtool2-completion as 
fsmtool2-completion
                install -p -m0644 
./scripts/etc/bash_completion.d/fsmtool2-completion 
debian/fsmd2/usr/share/bash-completion/completions/fsmtool2-completion
                installing 
scripts/etc/bash_completion.d/fsmtool2_mtest-completion as 
fsmtool2_mtest-completion
                install -p -m0644 
./scripts/etc/bash_completion.d/fsmtool2_mtest-completion 
debian/fsmd2-mtest/usr/share/bash-completion/completions/fsmtool2_mtest-completion

Attachment: 0xA811F9F222306A1E.asc
Description: application/pgp-keys

Reply via email to