I've been studying the Debian policy about shared libraries, and I think
I understand their strategy much better now.

It has several components.  First, the libraries themselves are separated
from the headers -- you have to have two packages per program.  (Well,
actually three in many cases, because runtime binaries are also kept
separate.)

Second, each package name containing a shared library ends in a number,
the "major revision number" of the library.

(There is also the shlibs business, but that is more of a convenience.
We could actually implement the rest of it now.)

So for example, we might have db3 and db4, two major versions of the same
library.  They will be accompanied by db3-dev and db4-dev, which contain
header files.

Let's say you build a package foo which depends on these.  Then foo will
say:
  Depends: db3
  BuildDepends: db3-dev

Later you build a package bar which wants db4.  Bar has similar dependencies,
on db4 and db4-dev.

The dependency in db4 is:
  Replaces: db3

Whereas the dependency in db4-dev is:
  Conflicts: db3-dev
  Replaces: db3-dev

Since db3 only contains the library, it will install
    db.3.x.y.dylib
    db.3.dylib -> db.3.x.y.dylib
    db.dylib -> db.3.x.y.dylib

Similarly, db4 only contains
    db.4.a.b.dylib
    db.4.dylib -> db.4.a.b.dylib
    db.dylib -> db.4.a.b.dylib

So if we now install db4 on top of db3, we will have both libraries
present in the system, with db.dylib pointing to the most recently
installed library.

The reason that the headers are separated out is that you only want one
copy of the headers installed at any given time, for the purposes of
compiling something.  So when you are compiling foo, the db3-dev
package will get installed, and when you compile bar, the db4-dev
package will get installed.

Debian keeps an old package like db3 around indefinitely, so that people
can continue to linke to it when they need to.

The more I think about this system, the better I like it.
 
  -- Dave


_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to