Hi, (disclaimer: apt, not aptitude, maintainer talking)
On Fri, May 20, 2016 at 09:54:23AM +1000, James Tocknell wrote: > 0x00007ffff7b3feed in debVersioningSystem::CheckDep(char const*, int, char > const*) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 > #0 0x00007ffff7b3feed in debVersioningSystem::CheckDep(char const*, int, > char const*) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 > #1 0x00005555557767c1 in infer_reason (pkg=..., reasons=std::set with 1 > elements = {...}) at ../../../../src/generic/apt/infer_reason.cc:178 [It is a bit confusing that the code of frame #1 is actually calling IsSatisfied(), but it is just a wrapper around CheckDep() so lets just ignore that for the moment] 10f0cf4a04b2526e9dea65facde865d993396417 adds this code, which passes the candidate version to IsSatisfied – but not all packages have a candidate! So that code should be adapted to test first if the package has a candidate and only if so check if the candidate satisfies the dependency. Now, we could ask why IsSatisfied requires a valid version and the answer is: nobody (aka me) thought anybody would pass it an invalid version as the soul reason for the one-line IsSatisfied is to hide the call to CheckDep behind a slightly nicer interface (1 vs 3 parameters) and all existing calls in apt passed only valid versions in… I am not sure it is a good idea to add checks to that method as its in various hot paths for apt & it has the potential of hiding bugs (at the expense of opening some like here). Either way, that needs more thought than I can shell out at the moment & adapting the call site should be easy. Best regards David Kalnischkies
signature.asc
Description: PGP signature