Whamcloud - gitweb
LU-13225 utils: fix install path for bash-completion 48/38548/3
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 8 May 2020 23:28:39 +0000 (17:28 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 19 Jun 2020 16:51:01 +0000 (16:51 +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.

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/38548
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@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 8d15abf..24f18f0 100644 (file)
@@ -601,7 +601,7 @@ fi
 %{_bindir}/lfs_migrate
 /sbin/mount.lustre
 /sbin/mount.lustre_tgt
 %{_bindir}/lfs_migrate
 /sbin/mount.lustre
 /sbin/mount.lustre_tgt
-%{_datadir}/bash-completion/completions/*
+@BASH_COMPLETION_DIR@
 %endif
 
 %if %{with manpages}
 %endif
 
 %if %{with manpages}
index 446598f..4c8bef4 100644 (file)
@@ -2736,7 +2736,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"], [
 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"
        ])
 ], [
        BASH_COMPLETION_DIR="$with_bash_completion_dir"