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

Re: apt-get's choice of a dependent package



Remco van de Meent wrote:

> Peter S Galbraith wrote:
> > 
> > It would be nice if apt had some way of knowing which package is
> > preferred to fulfill a dependency.
> 
> It has. When you specify multiple packages with a boolean OR, the first one
> is preferred ("Depends: tk8.2 | tk8.0" would lead to tk8.2 if neither of
> them is installed).

I see.

> > For example, the package august depends on `wish'.
> > `wish' is really anything in:
> > 
> >   tk8.0-ja or tk4.2 or tkstep8.0 or tkstep4.2 or tk8.0 or tk8.2
> 
> The 'problem' with wish is that it's a virtual package. Hence, the first
> package providing this virtual package is chosen to install.
> 
> $ apt-cache depends august
> august
>   Depends: <wish>
>     tkstep8.0
>     tkstep4.2
>     tk8.2
>     tk8.0-ja
>     tk8.0
>     tk4.2
> 
> ==> tkstep8.0 
> 
> This package needs tcl8.0 (among others), so that one gets selected as well.

So is the order given in the wish virtual package respected?
(How do I look up a virtual package anyway?)
Should I file a bug report against wish for not defaulting to
tk8.2?

Or should all packages that depend on a virtual package pick the
`best' one in case none are already installed, like:

 Depends: tk8.2 | wish

Thanks,

Peter


Reply to: