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

Re: apt-get not installing but aptitude does?



On Fri, Jan 31, 2014 at 05:46:45PM -0700, Bob Proulx wrote:
> David Kalnischkies wrote:
> > Bob Proulx wrote:
> > >   Investigating (0) libdb-dev [ amd64 ] < 5.1.7 -> 5.3.0 > ( libdevel )
> > >   Broken libdb-dev:amd64 Conflicts on libdb5.1-dev [ amd64 ] < 5.1.29-7 > ( libdevel )
> > >     Considering libdb5.1-dev:amd64 -1 as a solution to libdb-dev:amd64 -1
> > >     Holding Back libdb-dev:amd64 rather than change libdb5.1-dev:amd64
> > 
> > Two contenders: In the left corner: "libdb-dev" (the challenger) and in
> > the other "libdb5.1-dev". The "-1" next to each name signal the points
> > they got in their fight (Looks like they are not good fighters...).
> > As usual, in the case of a draw the challenger looses, so he has to hold
> > back with his wish to remove libdb5.1-dev. First case settled.
> 
> So I see that the "-1" above is a total that reports the count of
> points that has accumulated.  Both are equal so there is no winner.
> 
> Is there an additional debug option to be able to report what points
> went into the -1 total?

You can add:  -o Debug::pkgProblemResolver::ShowScores=1
It will output a basic scoring-table and after that a list of all
packages with a score (packages which got 0 are not listed explicitly).

Looking at code (and comments) of the scoring calculation might be
helpful to understand why a certain package gets a certain score:
http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=blob;f=apt-pkg/algorithms.cc#l377


> > libdb is a bit special in that it provides versioned -dev packages
> > which can't be co-installed as well as an unversioned one.
> > Why that is the case, you are better of asking the maintainers...
> 
> With the above information now known it does seem to be an unusual
> package strategy for this library.

It is "needed". boost is another library which has this pattern –
and has the same problem at times.


> > or someday around the end of this year a release critical bug will
> > be opened against apt asking for an explanation why apt "clearly
> > does the wrong thing here"(TM).
> 
> Possible too.  It does seem that apt-get might not be agressive enough
> at upgrading in this particular type of situation.  However it does
> indicate this state.  The admin is notified of the issue.  The admin
> can take manual action to do the "Right Thing" here.  It just doesn't
> do the Right Thing automatically.  It doesn't do the wrong thing.  It
> just isn't as nice as it could be.

The code also mentions how you can prevent "libdb5.1-dev" from 'winning'
both fights: -o pkgProblemResolver::Scores::NotObsolete=0

The problem with this is that while it "fixes" this situation it exposes
us (even more) to temporary breakage in the middle of a transition as in
a tie change would now be preferred, which is usually not a good idea
while the transition hasn't settled yet (and after it the tie is usually
'resolved' by the dependencies).


What could potentially be done is special-casing "bad fights", aka that
in the case of a draw and a negative scoring the challenger wins.
That could potentially help those packages without dependencies.
Transition for those do not happen as they have no dependencies…

The problem is just that not only -dev packages are in this category:
A few user-facing applications are in that category as well, but I guess
those will not have Conflicts which each other. Applications are usually
broken by libraries which have a few dependencies.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: Digital signature


Reply to: