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

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 <>
Change-Id: I3b796d26633459b98d7555e48e0bf5ea01c630d3
changes/02/869102/2 __v.stx.test2
Enzo Candotti 2023-01-03 15:32:29 -03:00
parent 13b24042a1
commit ca8be6b866
4 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,7 @@ Upstream-Name: python-fmclient
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.

View File

@ -0,0 +1 @@

View File

@ -1 +1 @@
tools/fm.bash_completion usr/share/bash-completion/completions/fm

View File

@ -11,4 +11,5 @@ export ROOT=$(CURDIR)/debian/tmp
python3 install -f --install-layout=deb --root=$(ROOT)
python3 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