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

Bug#229775: apt 2.7.7: build-dep doesn't work if priority is 499



Quoting Askar Safin (2024-01-02 16:05:03)
> It follows from my interpretation of the phrase "Subject to
> dependency constraints" from "man apt_preferences", that
> first apt should exclude logically inconsistent solutions. So it
> should first exclude "libuv1-dev 1.9.1-3", because it is
> inconsistent with the constraint ">= 1.10". Then apt should
> choose version with highest priority from versions, which
> are left. I. e. apt should choose "1.34.2-1~bpo9+1". But in
> practice I see this error message:
> 
> ===
> # apt-get build-dep cmake
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
> The following information may help to resolve the situation:
> 
> The following packages have unmet dependencies:
>  builddeps:cmake : Depends: libuv1-dev (>= 1.10) but 1.9.1-3 is to be installed
> E: Unable to correct problems, you have held broken packages.
> ===
> 
> So, apt for whatever reasons prefers logically inconsistent
> solution over consistent. Chooses wrong solution with high
> priority over correct solution with low priority. Chooses
> libuv1-dev 1.9.1-3 and then (of course) fails to install it,
> because the constraints are violated.
> 
> Okay, so I hope now I convinced you that this is a bug.

This is not how the apt dependency solver works. The apt solver uses pin
priorities to decide which package is the candidate version. What you want is a
different solver that is able to ignore pin values and find a solution
independent on what package has the highest pin priority. If you want that,
then why don't you use a solver that is not apt for your problem?

It feels to me like what you are describing as a bug is like saying that dash
is buggy because it does not support arrays. If you want arrays when writing
shell, use bash instead of dash. This is not a bug in dash as dash is
intentionally made to not support arrays.

In your case, maybe you should consider using aptitude or switch out the apt
dependency resolver to aspcud?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature


Reply to: