Re: How to change a symlink without breaking anything (problems with g++)
Morten Eriksen <firstname.lastname@example.org> writes:
> What is the correct manner of changing a symlink file belonging to a
> Debian package? Is it sufficient to just rm and re-link, or should I
> use any of the package-handling tools?
You can't. (Well, you can, but the next time you upgrade the package,
your change will be overwritten.) If the package in question uses
alternatives, you can use update-alternatives or directly change the
link in /etc/alternatives.
> (In case someone is interested, I'm asking because I just stumbled
> over a surprising issue with the g++ packages: doing an
> # apt-get install g++
> installed g++-3.3 (I was expecting just an upgrade to the previously
> installed g++-2.95), and made /usr/bin/g++ into a symlink pointing to
Yup, that's pretty intentional, and /usr/bin/g++ is intentionally not
> Just switching g++ versions like this is bound to cause mayhem for
> all development against any C++ libraries on the system already
> compiled with g++ v2.95, so I'm surprised that this happens just like
> that from the "testing" branch..?
Why? In the ideal case, testing would just be an exact copy of
unstable from a week and a half ago with no broken dependencies; some
packages are older, though, and currently some of the dependencies
aren't actually satisfiable. You can think of testing as a snapshot
of what the next Debian release will be like; if you really don't want
installed software to change like this, stick with stable.
In any case, if you have locally installed software you want to keep
working with, you'll probably need to explicitly use g++-2.95 as your
compiler, rather than the default g++. Otherwise, you'll need to
recompile all of your libraries and deal with the inevitable syntax
issues (g++ 3.3 is quite a bit stricter on C++ syntax than most other
compilers, including older g++).
David Maze email@example.com http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell