Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 467428 - =sys-apps/systemd-201 installs hidden bash-completion functions
Summary: =sys-apps/systemd-201 installs hidden bash-completion functions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-27 00:13 UTC by Sergei Trofimovich (RETIRED)
Modified: 2013-04-27 05:40 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2013-04-27 00:13:13 UTC
The completions are installed:

    # equery f systemd | grep completion
    /usr/share/bash-completion
    /usr/share/bash-completion/completions
    /usr/share/bash-completion/completions/hostnamectl
    /usr/share/bash-completion/completions/journalctl
    /usr/share/bash-completion/completions/localectl
    /usr/share/bash-completion/completions/loginctl
    /usr/share/bash-completion/completions/systemctl
    /usr/share/bash-completion/completions/systemd-coredumpctl
    /usr/share/bash-completion/completions/timedatectl
    /usr/share/bash-completion/completions/udevadm

but not seen by standard tools due to directory offset:

    # eselect bashcomp --list --global | grep systemctl
    # bashcomp-config | grep systemctl

They seem to work if I link them to, say, manually to ~/.bash_completion.d.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2013-04-27 05:30:52 UTC
sys-fs/udev puts udevadm to /usr/share/bash-completion/ instead of /usr/share/bash-completion/completions/

because in Fedora, Debian, and co. the bash-completion pkg-config file has the default of completionsdir= /usr/share/bash-completion/completions/ many upstreams use it as the default in their configure files too

Gentoo is a oddball with it's directory and I think this is something we should change to be more compatible with other major distros... :-/
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-27 05:39:09 UTC
Oh, I see the problem...

AC_ARG_WITH([bashcompletiondir],
        AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
        [],
        [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
                with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
        ] , [
                with_bashcompletiondir=${datadir}/bash-completion/completions
        ])])

I have no idea why they're having that weird default.

Anyway, it should be fixed now. I'm not revbumping since I will be adding -202 soon anyway.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-27 05:40:08 UTC
(In reply to comment #1)
> sys-fs/udev puts udevadm to /usr/share/bash-completion/ instead of
> /usr/share/bash-completion/completions/
> 
> because in Fedora, Debian, and co. the bash-completion pkg-config file has
> the default of completionsdir= /usr/share/bash-completion/completions/ many
> upstreams use it as the default in their configure files too
> 
> Gentoo is a oddball with it's directory and I think this is something we
> should change to be more compatible with other major distros... :-/

Please suggest that on the ml. In the meantime, I'll add getbashcompdir() to the eclass.