problems with XFree
Jehan
nahor@bravobrava.com
Thu Jul 25 09:13:00 GMT 2002
Nicholas Wourms wrote:
> As a rule of thumb, packages should *never* modify the /etc/profile
> script (even if you do back it up). This is a big no-no, as most
> *nix people would tell you. If you insist on getting into a
> discussion on why this is, then so be it. Instead, create 2 scripts
> (a csh and a sh) and drop them into the /etc/profile.d/ directory.
I don't like modifying /etc/profile either because I don't think there
any clean way to do it. But if you read the thread I summarized, someone
said that Unixes set X path in /etc/profile. And this make sense to me:
there are no guarantees on the order of execution of the scripts in
/etc/profile.d. What if one of them looks for X and doesn't find it
because the path has not yet been set? As you said in our heated thread
last time, X is quite an important package and we will have more and
more package depending on it.
If the 2 scripts in profile.d are preferred, then I already sent them
less than two weeks ago.
> This way we play it safe and every one is happy. Also, your scripts
> should check to see if the path has already been set, if it has, then
> don't set it again. Remeber, the more entries in the path, the
> slower Cygwin will operate.
If you read the scripts carefully, you'll see that I do check if the
path exists. I check in the install script if /etc/profile has a line of
the form "...PATH=.../usr/X11R6/bin...". Sure it doesn't handle every
single cases (what if someone uses a temporary variable). But it should
handle 99.99% of the cases. If such a line is already in /etc/profile, I
don't change it.
I also check the path in /etc/profile script itself using the echo/grep
line.
Jehan
More information about the Cygwin-xfree
mailing list