From 7b82ca100db333000d09f28c9f5cd34331dd9025 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Wed, 13 Oct 1999 16:19:38 +0000 Subject: [PATCH] Fix some logic errors in dependency-handling code --- ChangeLog | 7 +++++-- main/depcon.c | 4 ---- main/remove.c | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96e99460..e25e02d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,11 @@ Wed Oct 13 17:51:17 CEST 1999 Wichert Akkerman * Merge patches from Ben Collins : + fix windowresizing in dselect - + when upgrading check if a file is not also in the new package before removing - it, so we don't remove new files due to symlinks confusing us + + when upgrading check if a file is not also in the new package before + removing it, so we don't remove new files due to symlinks confusing us + + fix logic error in checkforremoval: it was breaking cycles in for the + wrong package + + fix findbreakcycle to remove cycles even for packages we are not changing Tue Oct 12 17:15:08 CEST 1999 Wichert Akkerman diff --git a/main/depcon.c b/main/depcon.c index 06bea478..d1de502b 100644 --- a/main/depcon.c +++ b/main/depcon.c @@ -104,10 +104,6 @@ int findbreakcycle(struct pkginfo *pkg, struct cyclesofarlink *sofar) { 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 --git a/main/remove.c b/main/remove.c index 166347c2..e1ad6d36 100644 --- a/main/remove.c +++ b/main/remove.c @@ -57,7 +57,7 @@ static void checkforremoval(struct pkginfo *pkgtoremove, 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; -- 2.39.5