From d1a14f90befa6dc7290d84088bcb00a454bf8cb7 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Thu, 6 Dec 2018 11:56:34 -0200 Subject: [PATCH] hooks/pre-pkg: deal with packages using /etc/bash_completion.d Detect when it is used and suggest /usr/share/bash-completion/completions instead. --- common/hooks/pre-pkg/99-pkglint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh index 441da4a59f..f7934acebe 100644 --- a/common/hooks/pre-pkg/99-pkglint.sh +++ b/common/hooks/pre-pkg/99-pkglint.sh @@ -32,6 +32,13 @@ hook() { fi done + # Check for bash completions in etc/bash_completion.d + # should be on usr/share/bash-completion/completions + if [ -d ${PKGDESTDIR}/etc/bash_completion.d ]; then + msg_red "${pkgver}: /etc/bash_completion.d is forbidden. Use /usr/share/bash-completion/completions\n" + error=1 + fi + # Forbid empty packages unless build_style=meta if [ "$build_style" != "meta" ]; then if [ "$(find $PKGDESTDIR/* -maxdepth 1 -type d 2>/dev/null)" = "" ]; then