From: Guillem Jover Date: Sun, 4 Jun 2006 15:42:01 +0000 (+0000) Subject: Fix dependency cycle breaking in the case when every link involves X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd677f30fac8c56b20e206339501cbe286f81be1;p=dpkg Fix dependency cycle breaking in the case when every link involves a Provides (Ian Jackson). This is a proper fix for #349442. Closes: #370017 --- diff --git a/ChangeLog b/ChangeLog index 50e9b9ff..0447bf6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-06-04 Ian Jackson + + * src/depcon.c (foundcyclebroken): Replace possi->ed argument to + findbreakcyclerecursive call with dependedon. + (findbreakcyclerecursive): Remove the last foundcyclebroken call + which was wrongly using the unrelated provider->installed.depended + linked list. Remove findbreakcyclerecursive call which may lead to + infinite recursion. + 2006-06-04 Guillem Jover * scripts/dpkg-parsechangelog.pl: Pass forward the '-l' option to diff --git a/debian/changelog b/debian/changelog index 5ffdceb6..7a892a35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ dpkg (1.13.21~) UNRELEASED; urgency=low Closes: #369928, #369958, #370157, #370174, #370210 * Print the correct file being parsed by dpkg-parsechangelog's debian parser. Closes: #368961 + * Fix dependency cycle breaking in the case when every link involves + a Provides (Ian Jackson). This is a proper fix for #349442. + Closes: #370017 [ Updated dpkg Translations ] * Czech (Miroslav Kure). diff --git a/src/depcon.c b/src/depcon.c index e8692d87..38530fab 100644 --- a/src/depcon.c +++ b/src/depcon.c @@ -56,7 +56,8 @@ static int foundcyclebroken(struct cyclesofarlink *thislink, for (sol=sofar; sol && sol->pkg != dependedon; sol=sol->back); /* If not, we do a recursive search on it to see what we find. */ - if (!sol) return findbreakcyclerecursive(possi->ed,thislink); + if (!sol) + return findbreakcyclerecursive(dependedon, thislink); debug(dbg_depcon,"found cycle"); /* Right, we now break one of the links. We prefer to break @@ -126,8 +127,6 @@ static int findbreakcyclerecursive(struct pkginfo *pkg, struct cyclesofarlink *s * still the one we use. */ if (foundcyclebroken(&thislink,sofar,provider,possi)) return 1; - if (foundcyclebroken(&thislink,sofar,possi->ed,provider->installed.depended)) return 1; - if (findbreakcyclerecursive(provider,&thislink)) return 1; } } }