Adjust system 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.

Test Plan:

PASS: Debian image built and installed successfully
PASS: Upon install check system cmd completion works properly
PASS: Check the system.bash file is under the proper path
PASS: AIO-SX properly bootstrapped
PASS: AIO-SX properly unlocked
PASS: Check after bootstrap and unlock that completion works

Story: 2009965
Task: 45260

Signed-off-by: aoliveir <adriano.oliveira@windriver.com>
Change-Id: Ib711618d695b2ae0e1537962fbe7c03d91b0fe28
This commit is contained in:
aoliveir 2022-05-03 22:35:23 +00:00 committed by Adriano Oliveira
parent 93a1403d6f
commit b99519e79f
4 changed files with 6 additions and 4 deletions

View File

@ -0,0 +1 @@
usr/share/bash-completion/completions

View File

@ -1,2 +1,2 @@
tools/system.bash_completion usr/share/bash-completion/completions/system
usr/share/bash-completion/completions/system.bash
usr

View File

@ -3,7 +3,7 @@ Upstream-Name: cgts-client
Source: https://opendev.org/starlingx/config
Files: *
Copyright: (c) 2013-2021 Wind River Systems, Inc
Copyright: (c) 2013-2022 Wind River Systems, Inc
(c) 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-2022 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

@ -4,6 +4,7 @@
export PYBUILD_NAME=cgts-client
# (chuck) - workaround for pbr version detection when running install
export PBR_VERSION=1.0.0
ROOT := $(CURDIR)/debian/tmp
%:
dh $@ --with python3 --buildsystem=pybuild
@ -14,5 +15,5 @@ override_dh_install:
python3 setup.py bdist_wheel \
--universal\
-d $(CURDIR)/debian/cgts-client-wheel/usr/share/python-wheels
install -p -D -m 644 tools/system.bash_completion ${ROOT}/usr/share/bash-completion/completions/system.bash
dh_install