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

Re: Improving dependencies on shared libraries



Le samedi 26 mai 2007 à 21:06 +0200, Raphael Hertzog a écrit :
> in the list of things that we can do to make it more easy to backport
> packages, there's one important item: have a finer-grained system for
> generating dependencies on shared libraries. The system should have
> historical knowledges of symbols exported by libraries. Then when
> generating dependencies on an given package, it should check which symbols
> are used and what minimal version of the library provided them.

This is not going to work. Checking that symbols are present in a
version does not guarantee they provide the required ABI.

Let's consider the following code for libfoo 1.1:

enum {
        FOO_MODE_A,
        FOO_MODE_B
}

int libfoo_render(foo_t *f, uint32 mode) {
        switch(mode) {
                case FOO_MODE_A:
                        do_something(f);
                        break;
                case FOO_MODE_B:
                        do_something_else(f);
                        break;
                default:
                        warn_noisily(mode);
                        abort();
        }
}

If libfoo 1.2 adds a new value in the enum (FOO_MODE_C), a new binary
built against it may use it, and in this case will need version 1.2.
However there is no obvious way by looking at the binary to tell whether
this is the case. If you just look at when the symbol was introduced,
you will just make the binary depend on version 1.2.

-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: