[PLUG] using update-alternatives

Karl M. Hegbloom karlheg at pdxlinux.org
Wed Jul 24 23:16:02 UTC 2002


On Wed, 2002-07-24 at 15:19, Paul Heinlein wrote:
> I installed a pretty bare-bones set of packages on my Debian/Alpha
> system (and the related thread about a small Debian being really small
> is spot-on :-) -- and I'm just now getting around to adding some
> development packages.
> 
> I decided to install the gcc-3.0 package rather than 2.95 for a 
> variety of reasons. In any event, the binary was installed as gcc-3.0 
> rather than gcc -- which is fine, but I'd like to have a 'gcc' or 'cc 
> in my $PATH.
> 
> There are all sorts of ways to accomplish this (a manual symlink or a
> shell alias are the two that come to mind), but I thought I'd try 
> using the update-alternatives facility instead.
> 
> So, what's the canonical way to add a 'cc' link to the alternatives
> system and point it at gcc-3.0?

man update-alternatives

You could install both "vim" and "nvi", then look at what they do in
their "/var/lib/dpkg/info/PKG.postinst" files, for a sample.





More information about the PLUG mailing list