This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

/etc/alternatives was RE: [Re: GCC 4 installation problem]


Dave Korn wrote:
>   Sounds more to me like you forgot to use the alternatives program to
> configure the alternatives and have been messing around manually in
its
> private data directories and broken it.
> 
>   (You're not the first person to do this.  For some reason it seems
to
> be a hard-to-resist temptation for people to just dive into the data
> directories and start tampering, rather than say reading the 
> alternatives readme or man/info page which would explain the
easy-to-use
> command-line syntax by which alternatives.exe will switch over the 
> symlinks correctly.)

I see two problems here:

1) Unless you already know that /etc/alternatives is a 'managed' 
directory, there's nothing to suggest that there's any tool associated 
with it, and certainly nothing to suggest that there's an associated 
database.

2) It's so easy to manually change the links that it's unlikely anyone 
is going to spend time looking for some (possibly non-existent) tool to 
do it.  By the time you've found the right tool, you could have changed 
the link and got on with whatever you were trying to do in the first 
place.

When the directory first appeared on Linux, I thought the links were
just set up manually.  It took me a while to discover that they were
managed, and that was only by digging around in RPMs for post-install
scripts to find out what kept changing my X desktop manager after an
update.

For the first problem, I think it would help avoid installation problems
if the directory contained a simple README file explaining how to 
properly maintain the links, and why manually changing them is a bad 
idea.  To avoid looking like just another link, and thus getting 
overlooked, I think this should be a real file, rather than a symlink 
to the README in the doc directory.  Maybe Chuck could add this to the 
cygwin alternatives package, or perhaps he would prefer the upstream 
chkconfig maintainer to consider it.

For the second problem, perhaps it would also help if the names of the 
links in the alternatives directory were a hash of the program name.
E.g.
 /usr/bin/gs -> /etc/alternatives/9ad6a289eea9c92be09d3a5a8bc737e6
 /etc/alternatives/9ad6a289eea9c92be09d3a5a8bc737e6 -> /usr/bin/gs-x11
where 9ad6a289eea9c92be09d3a5a8bc737e6 is the md5sum of "/usr/bin/gs".
This would make it much more obvious that the links were managed, or 
at least give one pause for thought before diving in.


Phil

This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]