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

Re: Bug#301075: On #301075: bison and yacc alternatives



On Sat, Mar 26, 2005 at 11:25:42AM +0100, Michael Schmitz wrote:
> It's not about a dangling alternatives link - that you could detect, and
> rightly refuse to overwrite it ('the system administrator sure knows what
> he's doing'). I don't understand why, in the absence of any link, the
> alternative isn't installed without invoking --auto. On this, I'd like
> some input from the dpkg crew.

(Note: I trimmed m68k-build from the CC list)

Well, maybe "dangling alternative" is a better term than "dangling link"
(I use "dangling" to describe a reference whose destination does not
exist).  I think dpkg maintains the alternatives database in
/var/lib/dpkg/alternatives, so merely removing the old byacc symlink in
/etc/alternatives or whatever does not do the trick.  We need to do
"update-alternatives --remove" to completely remove the dangling
alternative.

What I was suggesting was that dpkg knows the following things:

 1. bison is trying to set up an alternative for yacc
 2. The yacc alternative is pointed to byacc
 3. The byacc program does not exist, and does not belong to any
    currently installed package

So in principle dpkg should be able to determine that the byacc
alternative for yacc is bogus and remove it automatically.  This just
seems more elegant.

-- 
Chuan-kai Lin
http://www.cs.pdx.edu/~cklin/



Reply to: