Re: apt-get's choice of a dependent package
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).
> 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.
> I'm happy it didn't try to automatically install a more esoteric provider
> of wish, but I suppose it's possible.
It won't install a more esoteric provider of wish because the dependencies
are fulfilled. If ``august'' needs a specific version, it should mention
that in its dependencies.
Remco
Reply to: