Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947573 - app-shells/bash-completion-2.15.0 - kernel module completions missing
Summary: app-shells/bash-completion-2.15.0 - kernel module completions missing
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-06 00:38 UTC by Enne Eziarc
Modified: 2025-02-07 23:28 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
do not dereference symlinks when listing modules (bash_completion-modules_dereference.patch,493 bytes, patch)
2025-02-07 22:48 UTC, Samuel Bauer
Details | Diff
do not list modules twice with - and _ syntax (bash_completion-modprobe-duplicates.patch,627 bytes, patch)
2025-02-07 23:02 UTC, Samuel Bauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enne Eziarc 2025-01-06 00:38:04 UTC
This was a bit of a pain to figure out:

The kmod project convinced the bash-completion project they'd be maintaining completions themselves from now on in [1]. The intended way to get kmod completions, according to the commit in [2], is updating to >=sys-apps/kmod-35, which is hard for any user to comply with because as of this writing upstream haven't even yet released *v34*. The bash-completion project took kmod at their word and immediately marked its own kmod stuff as deprecated two months ago, and put out 2.15.0 since then.

The Gentoo ebuild unconditionally deletes everything upstream's marked as deprecated in [3]. This was probably a sensible decision when it was added (prior to gentoo.git), but maybe it's time to re-examine why/if it's needed. Looking at Debian's equivalent package rules, they delete a few colliding filenames but not to this extent.

[1]: https://github.com/scop/bash-completion/issues/1246
[2]: https://github.com/scop/bash-completion/commit/66a52b0e9bc1441f0758927da1a938d1d05857b6
[3]: https://github.com/gentoo/gentoo/blob/eff4986d8bd2ee868edf18192102cc86262c1fdd/app-shells/bash-completion/bash-completion-9999.ebuild#L64
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-06 01:18:39 UTC
Feels like these kernel ones continue to be a nuisance :)
Comment 2 Samuel Bauer 2025-02-07 22:48:37 UTC
Created attachment 918313 [details, diff]
do not dereference symlinks when listing modules

Do not forget that modules completion is giving way too much results to be usable when deciding to cherry pick module completion.

1. /lib/modules/$(uname -r)/build is not meant to be dereferenced -> overcompletion
Comment 3 Enne Eziarc 2025-02-07 22:58:45 UTC
FWIW the patch in bug 669128 to do that without invoking external binaries still works fine here.
Comment 4 Samuel Bauer 2025-02-07 23:02:38 UTC
Created attachment 918314 [details, diff]
do not list modules twice with - and _ syntax

2. modprobe modules names are valid under two "syntaxes": isa_io or isa-io
the bash completion lists them both: no matter name syntax, there is only one to load.

-------

this small patchset allowed me to use bash completion for modprobe in a more effective way.
Hope that app-shell/bash-completion maintainers will reintroduce modules completion to gentoo users, and even make it better using this patchset.

P.S.: hiding already loaded modules from modprobe completion list would be nice too. I thought I did it, but no tracks of patch for this.
Comment 5 Samuel Bauer 2025-02-07 23:28:14 UTC
(In reply to Samuel Bauer from comment #2)

use #669128 patch, it's way better :)