[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] fix for Assertion failure on "depedentry >= 4"



Ok, I burned my brain out on this one real bad. Following dependency
resolution is beyond the call of duty, but I feared not, and kept my
faith (clinging tightly to the Penguin artifact on my desk) and braved
the never-ending loops and cycles....

The result is a fix for this bug (and a severe headache)...

Enjoy,
  Ben

NOTE: I make no claims to the correctness of this code. It worked and I
am not questioning the technical reasons behind it. Sad that it took me
longer to fix this than the other bugs, yet it took the least to patch.
Binary files dpkg-1.4.1.13.old/main/.archives.c.swp and dpkg-1.4.1.13/main/.archives.c.swp differ
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 15:35:38 1999
@@ -44,13 +44,18 @@
   struct cyclesofarlink *sol;
   const char *postinstfilename;
   struct stat stab;
+  struct deppossi *dep;
 
   /* We're investigating the dependency `possi' to see if it
    * is part of a loop.  To this end we look to see whether the
    * depended-on package is already one of the packages whose
    * dependencies we're searching.
+   *
+   * We also check to see if it's one of the `possi' in the packages
+   * that we are checking.
    */
-  for (sol=sofar; sol && sol->pkg != dependedon; sol=sol->back);
+  for (sol=sofar; sol && sol->pkg != dependedon; sol=sol->back)
+    for (dep=sol->possi; dep && dep->ed != dependedon; dep=dep->next)
 
   /* If not, we do a recursive search on it to see what we find. */
   if (!sol) return findbreakcycle(possi->ed,thislink);

Attachment: pgpAJTaFb2AT7.pgp
Description: PGP signature


Reply to: