Преглед на файлове

Fix dependency cycle breaking in the case when every link involves
a Provides (Ian Jackson). This is a proper fix for #349442.
Closes: #370017

Guillem Jover преди 20 години
родител
ревизия
fd677f30fa
променени са 3 файла, в които са добавени 14 реда и са изтрити 3 реда
  1. 9 0
      ChangeLog
  2. 3 0
      debian/changelog
  3. 2 3
      src/depcon.c

+ 9 - 0
ChangeLog

@@ -1,3 +1,12 @@
+2006-06-04  Ian Jackson  <ian@davenant.greenend.org.uk>
+
+	* 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  <guillem@debian.org>
 
 	* scripts/dpkg-parsechangelog.pl: Pass forward the '-l' option to

+ 3 - 0
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).

+ 2 - 3
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;
       }
     }
   }