how to update /etc/alternatives

Dave Korn dave.korn.cygwin@googlemail.com
Tue Mar 3 20:42:00 GMT 2009


Lester Ingber wrote:
> The default for many files under /bin is linked to /etc/alternatives.
> I wanted to update by default gcc and g++ to v4, so instead of
> changing the .exe links in /bin, I wanted to have these changes made
> in /etc/alternatives.

  No, you don't.  You want to read the alternatives man page to find out how
to drive it, not go messing around behind its back with its private data.
Look for the "--config" option.

> Instead of doing this one file at a time, I tried re-installing all
> gcc/g++-4 packages, but all the gcc/g++ stuff under /etc/alternatives
> still points to v3?

  That is correct and as it should be.

> I just manually changed the gcc and g++ under /etc/alternatives to point
> to v4, but shouldn't this have been done automatically when I reinstalled
> all these packages?

  Sorry, but no it shouldn't.  There are no alternatives for GCC-4 yet, they
will be installed by GCC-4.3.2-2, at which point what you say will indeed
work.  One of the compilers had to go first, and it just happens that that's
GCC-3 because it's convenient and means it can now be put to bed for good.
This leaves a little period between the two releases when only one set of
alternatives configurations exists.  During this period, nothing has changed
from how it was before: you still have to specify "gcc-4" for v4, and plain
"gcc" still gets you v3.

  Once 4.3.2-2 is released, this will all become switchable, but not until
then.  If you go manually messing with the alternatives now, your installation
will probably break when the next GCC-4 release comes along, and you'll get to
keep the pieces.

    cheers,
      DaveK


--
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/



More information about the Cygwin mailing list