Your message dated Sun, 04 Jun 2006 14:34:56 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#370017: fixed in dpkg 1.13.21
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: dpkg
Version: 1.13.11
Tags: patch

If you have a situation where some packages A, B, C
    A -depends-> B' <-provides B
    B -depends-> C' <-provides C
    C -depends-> A' <-provides A
then dpkg doesn't break the cycle correctly.  This breaks for any
length of cycle, not just 3 packages.  In particular it breaks if A
depends on something that it itself provides (this seems to be a
fairly common packaging mistake).

While investigating a case of this bug I found that there was a line
of code which was quite wrong but which looked like an attempt to fix
this problem; it presumably caused whatever test case that developer
was using to pass:
    if (foundcyclebroken(&thislink,sofar,possi->ed,
                         provider->installed.depended))
      return 1;
from the deepest point in findbreakcyclerecursive (wrapped by me for
this email).  This line is quite wrong.  provider->installed.depended
is the head of a linked list and may have nothing to do with the
questions at hand; if you're lucky it is and then something useful
might happen I suppose (I haven't analysed this in detail).  But I
assume that this must have been an attempt to fix the bug I have now
fixed properly, since it might make the inner `provides-breaking' loop
in findbreakcyclerecursive actually do something sometimes, which it
otherwise would never do.

The correct fix is attached.

I was investigating this problem due to a report from an Ubuntu user
about 1.13.11ubuntu6, at bugs.launchpad.net/46530.  But this problem
is probably related to Debian #143307.

The patch provided by Frank Lichtenfeld in #349442 is also wrong and
might lead to infinite recursion.  findbreakcyclerecursive is not
allowed to recurse except via foundcyclebroken because
foundcyclebroken is the thing which detects the cycle and breaks it.

Ian.

diff -Nru /tmp/LqKFunIQBz/dpkg-1.13.11ubuntu6/debian/changelog 
/tmp/Nt4poBbeb8/dpkg-1.13.11ubuntu7/debian/changelog
--- /tmp/LqKFunIQBz/dpkg-1.13.11ubuntu6/debian/changelog        2006-05-05 
16:24:31.000000000 +0100
+++ /tmp/Nt4poBbeb8/dpkg-1.13.11ubuntu7/debian/changelog        2006-06-02 
18:49:34.000000000 +0100
@@ -1,3 +1,11 @@
+dpkg (1.13.11ubuntu7) who-knows; urgency=low
+
+  * Fix dependency cycle breaking in the case when every link involves a
+    Provides.  Malone 46530 and no doubt many other similar reports.
+    Also remove someone else's absurd attempt to solve the same problem.
+
+ -- Ian Jackson <[EMAIL PROTECTED]>  Fri,  2 Jun 2006 18:48:49 +0100
+
 dpkg (1.13.11ubuntu6) dapper; urgency=low
 
   * Completely remove md5sum diversion madness.  Instead, we Pre-Depend
diff -Nru /tmp/LqKFunIQBz/dpkg-1.13.11ubuntu6/src/depcon.c 
/tmp/Nt4poBbeb8/dpkg-1.13.11ubuntu7/src/depcon.c
--- /tmp/LqKFunIQBz/dpkg-1.13.11ubuntu6/src/depcon.c    2005-06-06 
05:07:12.000000000 +0100
+++ /tmp/Nt4poBbeb8/dpkg-1.13.11ubuntu7/src/depcon.c    2006-06-02 
18:54:28.000000000 +0100
@@ -56,7 +56,7 @@
   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,7 +126,6 @@
          * still the one we use.
          */
         if (foundcyclebroken(&thislink,sofar,provider,possi)) return 1;
-       if 
(foundcyclebroken(&thislink,sofar,possi->ed,provider->installed.depended)) 
return 1;
       }
     }
   }

--- End Message ---
--- Begin Message ---
Source: dpkg
Source-Version: 1.13.21

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

dpkg-dev_1.13.21_all.deb
  to pool/main/d/dpkg/dpkg-dev_1.13.21_all.deb
dpkg_1.13.21.dsc
  to pool/main/d/dpkg/dpkg_1.13.21.dsc
dpkg_1.13.21.tar.gz
  to pool/main/d/dpkg/dpkg_1.13.21.tar.gz
dpkg_1.13.21_i386.deb
  to pool/main/d/dpkg/dpkg_1.13.21_i386.deb
dselect_1.13.21_i386.deb
  to pool/main/d/dpkg/dselect_1.13.21_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <[EMAIL PROTECTED]> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun,  4 Jun 2006 19:02:44 +0300
Source: dpkg
Binary: dpkg dselect dpkg-dev
Architecture: source i386 all
Version: 1.13.21
Distribution: unstable
Urgency: low
Maintainer: Dpkg Developers <[EMAIL PROTECTED]>
Changed-By: Guillem Jover <[EMAIL PROTECTED]>
Description: 
 dpkg       - package maintenance system for Debian
 dpkg-dev   - package building tools for Debian
 dselect    - user tool to manage Debian packages
Closes: 45575 367892 368961 369928 369958 370017 370157 370174 370210
Changes: 
 dpkg (1.13.21) unstable; urgency=low
 .
   [ Guillem Jover ]
   * Disambiguate error message about conflicting command line actions by
     providing both long and short option names. Based on a suggestion by
     Josip Rodin. Closes: #45575
   * Add '/lib32' and '/usr/lib32' to the dpkg-shlibdeps library path search
     list. Closes: #367892
   * Revert usage of English perl non-essential module from install-info.
     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).
   * Vietnamese (Clytie Siddall).
Files: 
 9094d517d48ae0f7dc7218cc7096c18a 843 admin required dpkg_1.13.21.dsc
 fbc742e53b26a592cdde7af408ececb5 3036811 admin required dpkg_1.13.21.tar.gz
 db6be2000575910b5ee81c1a141df259 1542830 admin required dpkg_1.13.21_i386.deb
 85cd7ae3b982bbeb40c5c66eec5ffffa 503972 admin required dselect_1.13.21_i386.deb
 7a8c80e58e1894e9e508d6e2450aa307 109238 utils standard dpkg-dev_1.13.21_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEgwX2uW9ciZ2SjJsRAinCAKDKexLrHIFhMWhw/hXvonoNOlHtZQCeL7aU
o/6CgWkiz8ete6ZWtjUriSE=
=wmb9
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to