Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 140034

Summary: app-shells/bash-completion: can anybody pls rename /etc/profile.d/bash-completion to /etc/profile.d/bash-completion.sh
Product: Gentoo Linux Reporter: Lutz Lehmann <mail>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: bartelt, mail, Tanktalus
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Lutz Lehmann 2006-07-11 14:08:07 UTC
As far as I can tell, Gentoo currently has (almost) all the shell magic to automatically support bash completion once it has been emerged.

/etc/profile sources /etc/profile.d/*.sh

However, in both bash-completion-20050121-r10 and -20060301 there's /etc/profile.d/bash-completion, which either has to be renamed manually or sourced in .bashrc kinda like
'[ -f /etc/profile.d/bash-completion ] && . /etc/profile.d/bash-completion'

Wouldn't it be easier to just automatically install the file with the 'correct' name so that once you emerge bash-completion it works out of the box? It took me quite some time to find out why it did not :-)
Comment 1 SpanKY gentoo-dev 2006-07-14 22:01:06 UTC
this is done on purpose ... packages should not install .sh files into /etc/profile.d/
Comment 2 Lutz Lehmann 2006-07-16 08:18:35 UTC
(In reply to comment #1)
> this is done on purpose ... packages should not install .sh files into
> /etc/profile.d/
> 

At first, I wanted to recommend at least an einfo in the ebuild. After checking, I realized that it already exists. I just never noticed it because gentoo-bashcomp installs *after* bash-completion.

My fault :)
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-07-29 01:02:27 UTC
*** Bug 142055 has been marked as a duplicate of this bug. ***
Comment 4 Tanktalus 2006-09-21 19:29:24 UTC
I don't get this.  Why avoid putting .sh files in /etc/profile.d?  Why have it at all if it's not going to be used?  May as well put it in /etc/bash if it's going to be ignored in /etc/profile.d.

Isn't the point of having /etc/profile.d that it's a way to have ebuilds update the user environment automagically as required by the functionality that they provide?  In theory, if I've emerged bash completion, doesn't that mean I want it?
Comment 5 SpanKY gentoo-dev 2006-09-22 13:16:49 UTC
it's an opt-in system, not an opt-out
Comment 6 Lutz Lehmann 2006-09-23 03:36:53 UTC
(In reply to comment #5)
> it's an opt-in system, not an opt-out
> 

That's why it's not installed (emerged) by default.

I set a use flag, because I want a feature - opt-in.
I emerge a package, because I want it - opt-in.

Why do I have to double-opt-in on that package? And while we're at it, why does it install gentoo-bashcomp without even giving me a chance to opt-out?

Having rules to follow is fine with me, but with this particular package, I just don't get them