Ok, this is the working patch, I forgot about a small piece of code I had changed in another file...lack of testing and doing too many changes inbetween tests on my part. This works on Wichert's test case, and I also through in a ton of other packages to get a real test with many circular deps on other packages and virtual packages. Note: This just happens to include the same code from another patch on the BTS which worked on installing the circular packages, but not removing. This patch includes that aswell as the one for removing the packages. Ben (who is quitting before he becomes the dpkg martyr)
diff -urN dpkg-1.4.1.13.old/main/depcon.c dpkg-1.4.1.13/main/depcon.c --- dpkg-1.4.1.13.old/main/depcon.c Sun Nov 1 11:06:24 1998 +++ dpkg-1.4.1.13/main/depcon.c Tue Oct 12 17:44:45 1999 @@ -104,10 +104,6 @@ for (dep= pkg->installed.depends; dep; dep= dep->next) { if (dep->type != dep_depends && dep->type != dep_predepends) continue; for (possi= dep->list; possi; possi= possi->next) { - /* We can't have any cycles involving packages we're not trying - * to do anything with. - */ - if (possi->ed->clientdata->istobe == itb_normal) continue; /* Don't find the same cycles again. */ if (possi->cyclebreak) continue; thislink.possi= possi; diff -urN dpkg-1.4.1.13.old/main/remove.c dpkg-1.4.1.13/main/remove.c --- dpkg-1.4.1.13.old/main/remove.c Sun Nov 1 11:06:41 1998 +++ dpkg-1.4.1.13/main/remove.c Tue Oct 12 17:44:32 1999 @@ -57,7 +57,7 @@ debug(dbg_depcon,"ignoring depending package `%s'\n",depender->name); continue; } - if (dependtry > 1) { if (findbreakcycle(pkgdepcheck,0)) sincenothing= 0; } + if (dependtry > 1) { if (findbreakcycle(pkgtoremove,0)) sincenothing= 0; } before= raemsgs->used; ok= dependencies_ok(depender,pkgtoremove,raemsgs); if (ok == 0 && depender->clientdata->istobe == itb_remove) ok= 1;
Attachment:
pgpbU0NtoCb4M.pgp
Description: PGP signature