Mail Archives: cygwin/2009/03/26/07:42:55
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.
>=20
> (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=20
> alternatives readme or man/info page which would explain the
easy-to-use
> command-line syntax by which alternatives.exe will switch over the=20
> symlinks correctly.)
I see two problems here:
1) Unless you already know that /etc/alternatives is a 'managed'=20
directory, there's nothing to suggest that there's any tool associated=20
with it, and certainly nothing to suggest that there's an associated=20
database.
2) It's so easy to manually change the links that it's unlikely anyone=20
is going to spend time looking for some (possibly non-existent) tool to=20
do it. By the time you've found the right tool, you could have changed=20
the link and got on with whatever you were trying to do in the first=20
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=20
properly maintain the links, and why manually changing them is a bad=20
idea. To avoid looking like just another link, and thus getting=20
overlooked, I think this should be a real file, rather than a symlink=20
to the README in the doc directory. Maybe Chuck could add this to the=20
cygwin alternatives package, or perhaps he would prefer the upstream=20
chkconfig maintainer to consider it.
For the second problem, perhaps it would also help if the names of the=20
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=20
at least give one pause for thought before diving in.
Phil
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exch=
ange.
--
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/
- Raw text -