[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I rebuild alternative symlinks?

I found a way to do it, but I think the solution was less than ideal:

Install "Debarnacle" from CPAN (isn't even in debian...)

Run this command:

perl -MDebian::Debarnacle::Alternatives -e 'my $i = Debian::Debarnacle::Alternatives->get_list; while(my($l,$r) = splice(@$i,0,2)) { symlink($l,$r); print "$l $r\n"; }'

Now I have all my symlinks back... but I have a few questions still:

  1) is there a way to do this with just dpkg?

  2) if not, should there be? (update-alternatives --reinstall-all?)

  3) is it a bug or "feature" that keeps update-alternatives from installing
the symlinks in usr/bin and elsewhere if the ones in /etc/alternatives
already exist?


Tyler MacDonald <tyler@yi.org> wrote:
> I just moved a debian installation from one system to another by mirroring
> /opt, etc, /home, /var, and /usr/local -- and then using dpkg
> --set-selections to get all the same packages installed on the new box.
> Everything's gone great except for the alternatives system. For some reason,
> none of the symbolic links in /usr/bin (and i'm guessing anywhere) were
> reinstalled when I reinstalled the packages that provide them.
> I see that there's a lot of state data in /var/lib/dpkg/alternatives -- is
> there any way to tell dpkg or update-alternatives to read that state data
> and make everything the way it should be, or am I going to have to
> reconfigure each alternative manually?
> Thanks,
> 	Tyler
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: