RFC: Trigger openstack cli completion files openstack plugins. #1538

Open
opened 2026-05-17 10:04:05 +00:00 by stevetraylen · 1 comment
Member

I was asked to raise this here which I am happy to do so:

The /usr/bin/openstack cli can benefit from a bash completion file.

This bash completion file is dependent up which openstack cli plugins are installed and so must be generated late on host.

The package already contains a static unit openstack-completion.service that is working well.

Proposal:

I am wanting to rpm trigger the unit from installation and removal of the plugins.

Patch to python-openstackclient

https://src.fedoraproject.org/rpms/python-openstackclient/pull-request/12

this adds a filetrigger on entries in %{_datadir}/openstackclient/plugins to call the completion unit.

The plugin packages would maintain a file in this directory to activate the trigger. Plugin patch:

https://src.fedoraproject.org/rpms/python-heatclient/pull-request/1

This has much in common with the man-db.service for instance however that has the advantage that there is obvious trigger path to work with that I unfortunately do not have so I have constructed one.

Happy to followup anything here or via matrix.

I was asked to raise this here which I am happy to do so: The `/usr/bin/openstack` cli can benefit from a bash completion file. This bash completion file is dependent up which openstack cli plugins are installed and so must be generated late on host. The package already contains a static unit `openstack-completion.service` that is working well. Proposal: I am wanting to rpm trigger the unit from installation and removal of the plugins. Patch to python-openstackclient https://src.fedoraproject.org/rpms/python-openstackclient/pull-request/12 this adds a filetrigger on entries in `%{_datadir}/openstackclient/plugins` to call the completion unit. The plugin packages would maintain a file in this directory to activate the trigger. Plugin patch: https://src.fedoraproject.org/rpms/python-heatclient/pull-request/1 This has much in common with the man-db.service for instance however that has the advantage that there is obvious trigger path to work with that I unfortunately do not have so I have constructed one. Happy to followup anything here or via matrix.
Owner

I have two questions:

  • How expensive is the "generation"? Is it feasible to run it on runtime when the completion is used? If not, is it feasible to run it with some caching mechanism?

  • How expensive is it to make it an RPM %transfiletriggerin/%transfiletriggerpostun over the entire %python3_sitelib? I realize it is an absolute overkill, but we do have even broader triggers in Fedora (e.g. mandir, fonts, texlive, mime).

I have two questions: - How expensive is the "generation"? Is it feasible to run it on runtime when the completion is used? If not, is it feasible to run it with some caching mechanism? - How expensive is it to make it an RPM %transfiletriggerin/%transfiletriggerpostun over the entire %python3_sitelib? I realize it is an absolute overkill, but we do have even broader triggers in Fedora (e.g. mandir, fonts, texlive, mime).
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
packaging/guidelines#1538
No description provided.