On Fri, Dec 21, 2007 at 03:35:47AM +0100, Jiří Paleček <[EMAIL PROTECTED]> was heard to say:On Thu, 20 Dec 2007 16:25:50 +0100, Daniel Burrows <[EMAIL PROTECTED]> wrote:Could you try the attached patch an let me know if it cleans this up?Unfortunately, it doesn't.That's unfortunate. Could you run aptitude-create-state-bundle and somehow get the resulting file to me? (it's big)
Sorry, no. Even when I used 7z to compress it, which made quite a difference compared to bzip2, it had more than 13 MB, and that's too big for me to upload.
However, I created a minimal example showing this bug. You'll find it in the attachment (hope I included all the needed files). To see the bug, you will need to
- run aptitude with the state from the example - select package "goal" for installation - select package conflicting, version 1+select~this for installation- go to the problem resolver, and select the solution which installs package conflicting, version 2
- apply the solutionAlso, I did a little debugging, and found out this may in fact be a bug in aptitude. The message itself ("unexpected...") is caused by a discrepancy between the packages' states and the cache, namely, apt (or aptitude) thinks there's a conflict even after the solution has been applied. This leads to creation of a new resolver, which produces the null solution (because there is actually no conflict). The package which conflicts is, however still marked as broken, though it is not.
The code that should deal with this particular situation is in apt-pkg, depcache.cc, function pkgDepCache::Update. The reason why it is ineffective is that it only cleans the reverse-dependencies of virtual packages provided by Current version, which is none in this case. It should also consider the Install version, which is the one that causes the conflict, however, this version is already changed in the data so the code doesn't really know which one was it, so I think I'd better leave this to you as someone who understands the code more.
BTW is it necessary to call internal_mark_install() after set_candidate_version() in aptitudeDepCache::apply_solution() in this branch?
Regards
Jiri Palecek
apt-testcase.tar.bz2
Description: application/bzip2

