tags 539133 + patch
thanks

[This message was written a few weeks ago on a train and I'm just
 sending it now, having dug it out ...]

I have investigated #539133 and I think the patch below should fix it.

The previous algorithm for --predep-package made a number of
assumptions about the dependency structure which are no longer even
nearly true.  In particular, it assumed that no package would
Pre-Depend on an other package which would Depend on anything in
circumstances where this would matter.  Nowadays we even have Depends
cycles amongst the packages required to be configured for satisfying a
Pre-Depends and suchlike complications.  For example:
  docbook-xml P xml-core D sgml-base D perl D perl-modules D perl D libgdbm3
where P = Pre-Depends and D = Depends.

As a result of this it is no longer possible to satisfy
pre-dependencies by installing a single package at a time.  In the
example above, at the very least perl and perl-modules must be
configured in the same dpkg run to allow dpkg's dependency cyle
breaker to operate.

Therefore this revised --predep-package function can print _several_
Packages file stanzas.  If this happens you should feed dpkg _all_ of
the relevant .debs.

To avoid having to write a proper cycle detector I have made the
entirely arbitrary assumption that no more that 20 levels of
dependency (before cycles) will be relevant to a pre-dependency.  If
we exceed this limit someone should be shot.

This patch is against dpkg 1.14.25 (sorry).  I have tested it with the
test case available and status files supplied by Colin in the bug
report and also with a few other simple situations.

The arrangements with the goto in depcon.c are rather ugly; I wouldn't
really want to do it like that but I didn't want to make the match
more textually intrusive.  It would be better to do something like
  enum istobes depended_istobe(...appropriate arguments...) {
    if (itb == itb_preinstall)
      return dep->type == dep_predepends ? itb_normal : itb_installnew;
    return itb;
  }
and then call that in each of the two relevant places,
instead of switching directly on possi->ed->clientdata->istobe
and provider->up->up->clientdata->istobe.

Ian.

diff -ru orig/jigit-1.15/debian/changelog jigit-1.15/debian/changelog
--- orig/jigit-1.15/debian/changelog    2007-10-02 16:51:56.000000000 +0100
+++ jigit-1.15/debian/changelog 2007-10-02 16:51:31.000000000 +0100
@@ -1,3 +1,11 @@
+jigit (1.15-2ubuntu4) gutsy; urgency=low
+
+  * debian/rules: use build-stamp-debian instead of build-stamp
+    as the .orig.tar.gz contains build-stamp which makes it not actually
+    build mkimage, causing the package to be FTBFS (!)
+
+ -- Ian Jackson <i...@ubuntu.com>  Tue, 02 Oct 2007 16:51:05 +0100
+
 jigit (1.15-2ubuntu3) feisty; urgency=low
 
   * debian/control: Update maintainer fields according to debian-
Only in jigit-1.15/debian: changelog~
diff -ru orig/jigit-1.15/debian/rules jigit-1.15/debian/rules
--- orig/jigit-1.15/debian/rules        2007-10-02 16:51:56.000000000 +0100
+++ jigit-1.15/debian/rules     2007-10-02 16:50:25.000000000 +0100
@@ -5,19 +5,19 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-build: build-stamp
-build-stamp:
+build: build-stamp-debian
+build-stamp-debian:
        dh_testdir
 
        # Add here commands to compile the package.
        $(MAKE)
 
-       touch build-stamp
+       touch build-stamp-debian
 
 clean:
        dh_testdir
        dh_testroot
-       rm -f build-stamp
+       rm -f build-stamp build-stamp-debian
 
        # Add here commands to clean up after the build process.
        -$(MAKE) clean
Only in jigit-1.15/debian: rules~

Reply via email to