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

aptitude dependency-resolver behaviors (was Re: apt-get install sysvinit-core removes gnome?)



On 10/20/2014 at 11:59 AM, David Kalnischkies wrote:

> On Sun, Oct 19, 2014 at 09:32:54AM +0200, Matthias Urlichs wrote:
> 
>> David Kalnischkies:

>>> This isn't trying harder, it is trying increasingly incorrect
>>> solutions to the problem because aptitude assumes the users is
>>> not able to express himself correctly. apt-get is treating its
>>> user as its god instead, aka: user is always right, even if it
>>> makes no sense in apt's simple mind.
>>> 
>> My main problem is that, whenever I install a "difficult" package,
>> the first solution I get presented is always to simply not install
>> the package in question. The next 2^n-1 "solutions" transitively
>> remove everything that currently conflicts with installing the
>> thing in question. Rejecting the removal of a few core packages
>> then gets me the correct solution, e.g. upgrading two packages.
> 
> I think aptitude is calling this canceling actions. I would bet you
> can use this config setting to discourage it from doing that, but 
> ultimately its a design choice to allow or forbid them at all.
> 
>>> Selecting one package in an or-group is a grand example of people
>>> not understand their tools although the policy is simple and
>>> logic: If it isn't impossible to let it win, the first
>>> alternative wins. If the package manager would go for any
>>> heuristic based on simplicity of installation instead everyone
>>> would have lsb-invalid-mta as MTA because that is damn easy to
>>> install by any standard. Maintainers are very heavily relying on
>>> this property while e.g. building packages.
>> 
>> You don't have to drop that part of its logic. Choosing a different
>> package as a dependency should of course be a "last resort" action
>> (i.e. be heavily penalized). I'm not talking about changing that.
>> I'm talking about the fact that aptitude treats upgrading to a
>> slightly-lower-prioritized version of a package as a *way* worse
>> solution than removing that package (and/or 500 others).
> 
> Well, "slightly lower" priority means packages from a different
> release in general, so that isn't a safe action either. experimental
> and backports come to mind. Never upgrading to a security fix is
> another.
> 
> Also – but that might be a relatively controversial point – users
> are much better at figuring out which packages they don't want
> removed compared to e.g. which packages should be held at a lower
> version, so I can optimize the other values and let the user decide
> along a property he can easily reason about (I am not suggestion that
> aptitude or apt-get work that way, but who knows that for sure
> anyway, right?).

What I think is being asked for (and what I'd certainly like to see,
anyway) is a way for the user, having figured out which packages they
don't want removed, to tell the aptitude resolver that and have it taken
into account in calculating a dependency solution.

As it happens, there's an obvious way to do that: specify the package(s)
you don't want removed on the aptitude command line.

However, one of the behaviors I've observed - which I think, per the
quote above, is part of exactly what is being complained about - is that
aptitude will often propose a solution which involves "keep
package-X-from-command-line at its current version" before proposing a
solution which involves "install a new version of that same package".
Thus, specifying a package on the command line does not effectively tell
the aptitude resolver that you don't want it removed.

(I'm pretty sure I've seen a proposed solution, in a package-upgrade
scenario, which involved "remove package X and everything that depends
on it", as well. But I don't recall any specifics on that one, so it
might be my imagination.)

My core objection to aptitude is less that it proposes non-optimal
solutions first (although that's certainly part of it) than that it
frequently, indeed perhaps consistently, proposes solutions which
involve *not doing the actual thing which was requested* before
proposing ones which do. That does not seem remotely reasonable, to me.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: