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

Bug#83669: Shared libraries



>>>>> "Herbert" == Herbert Xu <herbert@gondor.apana.org.au> writes:

    Herbert> Ian Jackson <ian@davenant.greenend.org.uk> wrote:
    >> Currently, wrt shared libraries, we mandate (or do) this:

    >> foo2 (2.1) /usr/lib/libfoo.so.2 -> libfoo.so.2.1
    >> /usr/lib/libfoo.so.2.1 (actual library)

    >> foo-dev (2.1) /usr/include/foo.h /usr/lib/libfoo.so ->
    >> libfoo.so.2

    Herbert> How about /usr/lib/libfoo.so -> libfoo.so.2.1 and allow
    Herbert> shlibs with different minor version numbers to be
    Herbert> installed together by encoding it into the package name.
    Herbert> Of course, we'll have to manage /usr/lib/libfoo.so.2
    Herbert> dynamically as well.

Seems like a good idea, but it won't work.

foo2 (2.0) /usr/lib/libfoo.so.2 -> libfoo.so.2.0
           /usr/lib/libfoo.so.2.0 (actual library)

foo2 (2.1) /usr/lib/libfoo.so.2 -> libfoo.so.2.1
           /usr/lib/libfoo.so.2.1 (actual library)

foo-dev (2.1) /usr/include/foo.h
           /usr/lib/libfoo.so -> libfoo.so.2.0

the problem here is that the two versions of foo2 cannot be installed
at the same time (1: conflicting package name; 2: conflicting symlink).
However, if you really wanted to, you could have

foo2_0 (2.0)  /usr/lib/libfoo.so.2.0 (actual library)
foo2_1 (2.1)  /usr/lib/libfoo.so.2.1 (actual library)

foo2 (2.0)    /usr/lib/libfoo.so.2 -> libfoo.so.2.0
foo2 (2.1)    /usr/lib/libfoo.so.2 -> libfoo.so.2.1

foo-dev (2.1) /usr/lib/libfoo.so -> libfoo.so.2.0

which means that multiple minor versions of the library can be
installed at the same time, and the version of foo2 determines which
one to be used for run-time, while foo-dev determines which one should
be used for compilation. foo-dev is independent of foo2.

People might complain about foo2 (do we really need a package
containing nothing but a symlink?), but personally I like the idea
(compare with task packages which are empty).

I think it is simple to understand, and adds little overhead (just
foo2). Packages work as normal (installing foo2 2.1 or foo-dev 2.1 for
instance would automatically install foo2_1).

Comments?
-- 
Brian May <bam@debian.org>



Reply to: