[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#348336: improve section on shared config files



On Monday 30 January 2006 13:17, Santiago Vila wrote:
> On Mon, 30 Jan 2006, cobaco (aka Bart Cornelis) wrote:
> > On Sunday 29 January 2006 02:36, Santiago Vila wrote:

> I object to b) being in policy. The file /etc/profile is not a file
> which two or more packages need to be able to modify.

> > [...]
> > On the other hand there's currently at least 5 packages[1] that have a
> > blurb in their README saying something to the effect of "add this bit
> > to /etc/profile for the package to do everything it promises to".

> Not at all. Just because some packages do something does not mean they
> need to do it, or that they need to do something the way they do it.
>
> For example, let't take the user-es package, which you always mention
> as an example of package that "needs" profile.d. What does such package
> do?
>
> It has a README saying the user to add this line to /etc/profile:
>
> if [ -f /etc/language-es ]; then source /etc/language-es; fi
>
> The file /etc/language-es sets lot of environment variables. However,
> /etc/profile is the wrong place to do that, as it does not work in every
> shell. The file /etc/environment would be much more appropriate.

except that one the variables is set conditionally, which AFAIK you can't do 
in /etc/environment
(Note: otherwise I agree that in the case of user-es /etc/environment is a 
better place to do this, though the current approach certainly works for 
bourne-type shells)

Though that doesn't stop the need for a modularization/adaptation mechanism, 
it just moves it from /etc/profiles to /etc/environment. 

> So, just because some packages tell the user "modify /etc/profile" does
> not mean they "need" to modify /etc/profile.

As far as I know there is no cross-shell way to conditionally set 
environment variables which both desktop-profiles and user-es need (the 
former more so then the latter). 

That only leaves the option to do it piecemal, which needs adaption 
of /etc/profile (and similar files for other shells). If you have a better 
way of meeting this particular need I'd love to hear it.

Also note that the "(e.g. bash and other bourn compatible shells 
share /etc/profile)"-bit in the proposed patch can easily be removed it 
that's what realy bugs you, that wouldn't change the proposal in any 
meaningfull way.
-- 
cobaco (aka Bart Cornelis):
    Coördinator Belgisch Skolelinux team
    Coördinator Nederlandse Skolelinux vertaling

Attachment: pgpWCaoKKz1Ej.pgp
Description: PGP signature


Reply to: