bashrc fix
Kok, Auke
sofar at foo-projects.org
Tue Mar 6 16:48:50 CET 2007
Zbigniew Luszpinski wrote:
> Tuesday 06 of March 2007 05:09:26 Kok, Auke wrote:
>> Zbigniew Luszpinski wrote:
>>> lunar changelog:
>>> *if PATH was exported earlier, preserve its content (e.g. /etc/profile
>>> loads earlier),
>> PATH is *ALWAYS* set earlier, e.g. cron sets it, bash itself does so as
>> well.
>>
>> The way that you implemented this it will *add* existing values to it,
>> making them appear double. that is not right.
>
> That was my intention. Preserve path variable instead of erasing it with path
> settings hardcoded to bashrc. Possible fixes:
>
> 1) If they are really double why not removing redundand path variable from
> bashrc? Exporting several times the same variable renders it hard to improve
> in the future (having to remember all the places where it was hardcoded).
>
> 2) To protect against double defining we could save path variable content to
> file and maintain it using sed or other text editor. Everytime someone needs
> to export path it could read it from file (like e.g. /etc/LOCALE). Thanks to
> this I could tolerate (ugly imho) path hardcoding in many files.
you should never expect *by default* that non-interactive scripts have any other
path.
if you, locally, wish to change this that is OK. but not for everyone that is
using this distribution.
The defaults are done for a very good reason and they should absolutely stay the
same.
> I was going to fix the bug instead of bypassing it. Why nulling lang setting?
> I understand why .bash_profile is better than bashrc. You have right. I will
> investigate this and open bug in KDE bugzilla. But nulling lang in bashrc is
> still mysterious for me. Possible fixes:
nulling LANG in bashrc is done for this reason: all logging output to syslog
should be in english by default.
Auke
More information about the Lunar
mailing list