Whamcloud - gitweb
LU-13225 utils: fix install path for bash-completion 70/38670/2
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 8 May 2020 23:28:39 +0000 (17:28 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Jul 2020 07:28:06 +0000 (07:28 +0000)
Fix the default install path for bash-completion if the package is
not installed at build time.  This avoids BASH_COMPLETION_DIR being
badly formatted in the lustre.spec file.

Lustre-change: https://review.whamcloud.com/38548

Fixes: dfb4afc24102 ("LU-13225 utils: bash completion for lfs and lctl")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie50071c4ff86f57bc9dd53409ae339da2a3ebbe5
Reviewed-on: https://review.whamcloud.com/38670
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre.spec.in
lustre/autoconf/lustre-core.m4

index f88455e..bd212ee 100644 (file)
@@ -524,7 +524,7 @@ fi
 %{_mandir}/man?/*
 %endif
 %{_datadir}/lustre
-%{_datadir}/bash-completion/completions/*
+@BASH_COMPLETION_DIR@
 %{_includedir}/lustre
 %{_includedir}/linux/lnet
 %{_includedir}/linux/lustre
index cd89c76..4c623e4 100644 (file)
@@ -3715,7 +3715,7 @@ AC_ARG_WITH([bash-completion-dir],
 AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
        BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
        AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
-               [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"]
+               [BASH_COMPLETION_DIR="/usr/share/bash-completion/completions"]
        ])
 ], [
        BASH_COMPLETION_DIR="$with_bash_completion_dir"