On Sun, 15 May 2016 11:25:48 +0100 Ben Hutchings <b...@decadent.org.uk> wrote:
>
> The man page says:
> 
>        It can be a proper completion snippet, and in that case it
> would be installed in the completion directory, and no other actions
> would be performed.
> 
> Bug #824385 in initramfs-tools occurred because I failed to update the
> list and dh_bash-completion then quietly fell back to treating it as a
> completion snippet.
> 
> I believe a completion snippet must include a 'complete' command, so
> please consider applying this patch to add minimal validation of the
> possible snippet.

Although I understand that it would be nice to have such a check, it
would cause packages that provide completions files that do *not* have
the `complete' keyword in them to fail.  For instance, on my machine,
the following files lack the keyword:

  $ for file in `find /usr/share/bash-completion/completions/ -type f`; do \
      grep complete ${file} > /dev/null; \
      if [ $? -ne 0 ]; then \
        echo $file;\
      fi; \
    done
  /usr/share/bash-completion/completions/cme-dpkg-patch
  /usr/share/bash-completion/completions/cme_multistrap
  /usr/share/bash-completion/completions/perf

And these files are not shipped by bash-completion:

  dpkg --search /usr/share/bash-completion/completions/cme-dpkg-patch 
/usr/share/bash-completion/completions/cme_multistrap 
/usr/share/bash-completion/completions/perf
  libconfig-model-dpkg-perl: 
/usr/share/bash-completion/completions/cme-dpkg-patch
  libconfig-model-perl: /usr/share/bash-completion/completions/cme_multistrap
  linux-base: /usr/share/bash-completion/completions/perf

I think this change would cause a lot of trouble in the build servers.

Any thoughts?

Cheers,
Gabriel

Reply via email to