Re: development packages for shared library, and their dependencies.
* Junichi Uekawa (dancer@netfort.gr.jp) wrote:
>
> Hi,
>
> I've been checking how shared libraries are being packaged in Debian,
> and how "-dev" files are being currently treated, and I noticed that
> many -dev packages have a very small dependency.
>
> However, my understanding is that all "-dev" packages should depend on
> other "-dev" packages which is required for the "-dev" package to
> work.
>
> In fact, if it was done properly with qt2 and libpng situation,
> it should have been causing a "cannot satisfy build-depends"
> situation instead of creating binaries which somehow were broken.
This should be the case, but I think the way libpng's dependencies are
set up caused even well-behaved -dev packages to produce broken binaries.
Take libwxgtk2.2-dev:
Depends: wxwin2.2-headers (= 2.2.9), libwxgtk2.2 (= 2.2.9),
libgtk1.2-dev, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev,
libc6-dev
It correctly depends on all the -dev packages it requires. In addition,
it specifically depends on libpng2-dev which is the same package it
build-depends on. This should guarantee that both libwxgtk and client
apps are built against libpng2.
However, libpng-dev Provides: libpng2-dev and vice-versa, so in effect
there is no guarantee that the -dev packages will match at all!
Furthermore, if there is just a single -dev package to accompany a
library, the only way to ensure that the soname bump happens correctly is
for the lib{wxgtk,qt,whatever}-dev to depend on exactly the same version
of the libpng-dev that it was built against. Perhaps some shlibs-like
substitution is needed at build time? Either that or mandate that every
-dev package use the libfooSOVERSION-dev scheme.
Joshua
--
Joshua Haberman <joshua@haberman.com>
Reply to: