Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 767871 - app-admin/pass-otp-1.2.0: wrong location for bash completion file pass-otp
Summary: app-admin/pass-otp-1.2.0: wrong location for bash completion file pass-otp
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Haelwenn (lanodan) Monnier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-29 16:21 UTC by Alexander Graf
Modified: 2023-09-07 08:55 UTC (History)
1 user (show)

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


Attachments
Fixed ebuild for app-admin/pass-otp-1.2.0 (pass-otp-1.2.0-r1.ebuild,631 bytes, text/plain)
2023-09-07 08:55 UTC, Tobias Leupold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Graf 2021-01-29 16:21:28 UTC
Hi.

The ebuild installs /usr/share/bash-completion/completions/pass-otp
This file is not a stand-alone bash-completer but adds functions to the existing pass completer.
It needs to be installed to /etc/bash_completion.d/pass-otp in order to function correctly.

This can be fixed by removing BASHCOMPDIR="$(get_bashcompdir)" from the emake call or by replacing it with BASHCOMPDIR="/etc/bash_completion.d" - which is the upstream default.

Alex
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2021-01-29 16:31:24 UTC
/usr/share/bash-completion/completions is the default install location for packages. Istead of moving the file to some location whereit is not supposed to be installed by portage, the completion file should be fixed to work independently from its location.
Comment 2 Alexander Graf 2021-01-29 17:02:46 UTC
Hi Lars,

sorry, I thought /etc/bash_completion.d is valid location, as app-shells/gentoo-bashcomp installs its gentoo-style-init there too.

pass-otp is not a bash-completion script but only a function definition to be used by the bash-completion script.

I don't think bash-completion can handle multiple completers for a single command (here: "pass").

Feel free to close this.

Alex
Comment 3 Tobias Leupold 2023-09-07 08:49:41 UTC
I ran into this exact problem.

I have an Artix machine also running pass-otp. It installs the very same bash completion file (as also to be found upstream), and it puts it in /etc/bash_completion.d/. On Artix, it works out of the box, in contrast to the ebuild's approach.

As pass-otp is a pass plugin and the completion is also only an extension to the existing pass completion definition, I think this one can't live on it's own by defintion, as it's not a complete completion file -- the "otp" part is only a new "pass" parameter, so I don't think it would be even possible to have a stand-alone completion definition, is it?!

The fact that bash completion itself sources /etc/bash_completion.d/ and "pass otp" completion works as soon as the upstream file is put there leaves the impression to me that, in fact, /etc/bash_completion.d/ _is_ a standard place to put this very "plugin" type of definitions.

Would be nice if this was fixed. IMO this is not an upstream issue, but a Gentoo downstream one.
Comment 4 Tobias Leupold 2023-09-07 08:55:18 UTC
Created attachment 870013 [details]
Fixed ebuild for app-admin/pass-otp-1.2.0