Bug 19259 - Support --with-bash-completion-dir=
Summary: Support --with-bash-completion-dir=
Status: RESOLVED MOVED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-23 08:45 UTC by Santiago M. Mola
Modified: 2018-08-22 22:03 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Santiago M. Mola 2008-12-23 08:45:00 UTC
Currently, dbus bash completion is installed under /etc/profile.d/. This just works but it's different of how most distros manage bash completion scripts. Adding a --with-bash-completion-dir= or similar option would help us to choose where to install dbus completion (/etc/bash-completion.d in Debian, /usr/share/bash-completion/ in Gentoo, etc).

One option could be default --with-bash-completion-dir= to /etc/profile.d/ and be done with it.

Another one would be to rename 'dbus-bash-completion.sh' to just 'dbus' and default bash-completion-dir to /etc/bash-completion.d.

The first one just works, and the second integrates better in some distros.
Comment 1 Colin Walters 2009-01-27 15:53:36 UTC
It looks to me like we should just always use bash_completion.d ?
Comment 2 Santiago M. Mola 2009-01-28 03:57:11 UTC
(In reply to comment #1)
> It looks to me like we should just always use bash_completion.d ?
> 

There are plans to use a different bash-completion instalation layout in the near future [1], but /etc/bash_completion.d will still work for backwards compatibility, so it's safe to always use it if no --with-bash-completion-dir= is implemented.

[1] http://wiki.debian.org/Teams/BashCompletion/Proposals/NewDirectoryLayout
Comment 3 Colin Walters 2009-01-30 13:03:57 UTC
commit 299460549e92665e5ea09d459d3985fc85d8d73c
Author: Colin Walters <walters@verbum.org>
Date:   Fri Jan 30 16:03:11 2009 -0500

    Bug 19259: Always use /etc/bash_completion.d
    
    This looks like what bash upstream has standardized on.
Comment 4 David Zeuthen (not reading bugmail) 2009-02-04 17:40:05 UTC
On Fedora the bash-completion RPM is needed for this to work. It is not reasonable to pull in that package to get completion support for dbus-send.

The thing is that Bash itself doesn't know anything about /etc/bash_completion.d and no-one have provided evidence for this claim the many times I've specifically asked for it. 

It is true that many distros standardize on the /etc/bash_completion.d directory but some disagree on whether it is used by default and until bash upstream blesses this directory it's besides the point anyway.

Please move the file back to /etc/profile.d. Thanks.
Comment 5 Santiago M. Mola 2009-02-05 05:08:18 UTC
(In reply to comment #4)
> On Fedora the bash-completion RPM is needed for this to work. It is not
> reasonable to pull in that package to get completion support for dbus-send.

In my opinion, that's maintainer's problem, and I don't see how is it a problem to install bash-completion RPM (which is just a small set of bash scripts). However, if that's really a problem, a --with-bash-completion-dir= switch could be added. Or maintainers can manually change the location.

> The thing is that Bash itself doesn't know anything about
> /etc/bash_completion.d and no-one have provided evidence for this claim the
> many times I've specifically asked for it. 
> 
> It is true that many distros standardize on the /etc/bash_completion.d
> directory but some disagree on whether it is used by default and until bash
> upstream blesses this directory it's besides the point anyway.
>

AFAIK, Bash upstream won't standarize any directory for this since this is outside bash's scope. Bash-completion (as in bash-completion suite) is just an external set of scripts providing homogeneous bash completion handling. Most distros are shipping it and some are involved in upstream development (including Fedora's maintainer).

> Please move the file back to /etc/profile.d. Thanks.

Strictly speaking, /etc/profile.d isn't a standard location neither.
Comment 6 GitLab Migration User 2018-08-22 22:03:41 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus-glib/issues/14.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.