Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
$PATH and /usr/local/bin !!!!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
trapni
Developer
Developer


Joined: 16 May 2002
Posts: 251
Location: Germany/Berlin

PostPosted: Mon Jul 01, 2002 10:24 pm    Post subject: $PATH and /usr/local/bin !!!! Reply with quote

Hi all,

I'm not really complaining, although I'd rate it as a bug but it really *peep*.

It's usually to have /usr/local/bin before /usr/bin and /usr because there are all local binaries stored special for this machine.
This was successfully done on my old SuSE box. But Gentoo enforces the $PATH to have "/bin:/usr/bin" to be definitely the first in the search path. That sucks. since you can't override things located there by default.
Image colorgcc. You've normally gcc placed in /usr/bin and want now all output piped through colorgcc. So you usually create a symlink from /usr/bin/colorgcc to /usr/local/bin/gcc (and g++, and what ever you like). This is okay unless you don't need it. really need it. because /usr/local/bin/gcc gets never called since /usr/bin/gcc is definitely before found.
Okay, I can modify the /etc/profile or /etc/profile.env. But what about suggesting a /etc/profile.local (or /etc/conf.d/profile.local wich gets invoked by /etc/profile after everything system like is done. So that I am the master in /etc/conf.d/profile.local and can then override everything I need.

Thanks,
Christian Parpart.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Mon Jul 01, 2002 10:26 pm    Post subject: Reply with quote

trapni wrote:
Okay, I can modify the /etc/profile or /etc/profile.env.


Yes, you can. :D
Back to top
View user's profile Send private message
trapni
Developer
Developer


Joined: 16 May 2002
Posts: 251
Location: Germany/Berlin

PostPosted: Mon Jul 01, 2002 10:27 pm    Post subject: Reply with quote

Why I'm suggesting the file /etc/conf.d/profile.local is because there is more than colorgcc to be invoked at a new session for each user.

e.g. alias ls='ls --color=auto' etc.

Regards,
Christian Parpart.
Back to top
View user's profile Send private message
trapni
Developer
Developer


Joined: 16 May 2002
Posts: 251
Location: Germany/Berlin

PostPosted: Mon Jul 01, 2002 10:57 pm    Post subject: Reply with quote

delta407 wrote:
trapni wrote:
Okay, I can modify the /etc/profile or /etc/profile.env.


Yes, you can. :D
But is it really thought to be so? I don't think so. /etc/profile.env is vor environment variables only, /etc/profile does lots of stuff, but upgrading your system is much easier if you can keep your own stuff together (i.e. in /etc/profile.local wich gets invoked by /etc/profile before he exists)

Isn't it????
Christian Parpart.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Mon Jul 01, 2002 11:08 pm    Post subject: Reply with quote

So then add:

Code:
if [ -e "/etc/profile.local" ]
then
  source /etc/profile.local
fi


To your /etc/profile :D
Back to top
View user's profile Send private message
trapni
Developer
Developer


Joined: 16 May 2002
Posts: 251
Location: Germany/Berlin

PostPosted: Tue Jul 02, 2002 12:06 am    Post subject: Reply with quote

Yeah right. But couldn't we add that feature(!) to the distro it self? (instead of reediting it on each update)?

Thanks,
Christian Parpart.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum