Fix fm command bash dynamic completion
For dynamic bash completion, instead of using the legacy /etc/bash_completiond.d, the current bash-completion can use a dynamic mechanism in which the customized completion is called upon completion activation. The new location that is already pointed by the .bashrc file, also engaged by the /etc/bash_completion, is /usr/share/bash-completion/completions. However, the bash file was placed under a subfolder with the name of the command which is not necessary since the file already contains the command name. Also, the proper file name shall contain .bash extension. Closes-Bug: 2001553 Test Plan: PASS: Build python-fmclient package. PASS: Build Debian image and install it successfully. Verify fm.bash is installed under /usr/share/bash-completion/completions PASS: Verify bash completion is working as expected: Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com> Change-Id: I3b796d26633459b98d7555e48e0bf5ea01c630d3
This commit is contained in:
parent
13b24042a1
commit
ca8be6b866
@ -3,7 +3,7 @@ Upstream-Name: python-fmclient
|
||||
Source: https://opendev.org/starlingx/fault
|
||||
|
||||
Files: *
|
||||
Copyright: (c) 2013-2021 Wind River Systems, Inc
|
||||
Copyright: (c) 2013-2023 Wind River Systems, Inc
|
||||
Copyright: Others (See individual files for more details)
|
||||
License: Apache-2
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -24,7 +24,7 @@ License: Apache-2
|
||||
# If you want to use GPL v2 or later for the /debian/* files use
|
||||
# the following clauses, or change it to suit. Delete these two lines
|
||||
Files: debian/*
|
||||
Copyright: 2021 Wind River Systems, Inc
|
||||
Copyright: 2021-2023 Wind River Systems, Inc
|
||||
License: Apache-2
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
1
python-fmclient/debian/deb_folder/python3-fmclient.dirs
Normal file
1
python-fmclient/debian/deb_folder/python3-fmclient.dirs
Normal file
@ -0,0 +1 @@
|
||||
usr/share/bash-completion/completions
|
@ -1 +1 @@
|
||||
tools/fm.bash_completion usr/share/bash-completion/completions/fm
|
||||
usr/share/bash-completion/completions/fm.bash
|
||||
|
@ -11,4 +11,5 @@ export ROOT=$(CURDIR)/debian/tmp
|
||||
override_dh_install:
|
||||
python3 setup.py install -f --install-layout=deb --root=$(ROOT)
|
||||
python3 setup.py bdist_wheel --universal -d ${CURDIR}/debian/python-fmclient-wheel/usr/share/python-wheels
|
||||
install -p -D -m 644 tools/fm.bash_completion ${ROOT}/usr/share/bash-completion/completions/fm.bash
|
||||
dh_install
|
||||
|
Loading…
Reference in New Issue
Block a user