[Aptitude-devel] Bug#671486: aptitude: does not select prefered alternative on alternative replacement

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Thu Mar 17 20:45:56 UTC 2016


Control: tags -1 + moreinfo


Hi Yann,

2012-05-04 14:28 Yann Dirson:
>Package: aptitude
>Version: 0.6.6-1
>
>* Base situation:
>
>$ apt-cache policy phonon
>phonon:
>  Installed: 4:4.6.0really4.5.1-1
>  Candidate: 4:4.6.0.0-1
>
>alternative "phonon-backend-vlc | phonon-backend" provided by phonon-backend-xine
>[...]
>=> phonon-backend-null appears to be taken randomly, while there is a prefered alternative listed

IMO and according to policy [1], there's nothing special about the first
alternative.

  [1] https://www.debian.org/doc/debian-policy/ch-relationships.html

I think that it's a special case for buildds or common practice that
people do to ensure installability when building and so on, but nothing
that the package managers have to abide to.


I think that aptitude doesn't pay attention at all about the relative
position, but even if it does initially, it tries to be smart about it
in cases of conflicts and install packages depending on the overall
solution.

E.g. if you have many of the -vlc or -xine dependencies installed it
might prefer one over the other, in the case of -null maybe it prefers
it simply because it has to install less packages.

(From a high level point of view, aptitude cannot make the cognitive
leap of thinking that if "-null" is "desirable" because it installs few
packages, maybe it is because in fact it provides less/no functionality
compared with the others).


So, all in all, I don't think that this is a bug, but a feature; and the
fact that other tools prefer the first solution is to overcome
limitations on their side.


>Also note the side problem of an alternative removing 18 packages and breaking a Recommends
>being prefered over selecting another alternative.  Maybe worth split the bug for this one ?

There are many about that already :-)


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list