Gentoo Archives: gentoo-dev

From: Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] QA question wrg. GRP
Date: Thu, 05 Feb 2004 03:57:08
Message-Id: 20040205045722.6b025c2e@eusebe
In Reply to: [gentoo-dev] QA question wrg. GRP by Spider
1 On Thu, 5 Feb 2004 02:27:48 +0100
2 Spider <spider@g.o> wrote:
3
4 >
5 > However, this is bad and broken behaviour as we just get one headache
6 > for another ( what package supplies -that- .so file then? which of
7 > theese 6000 packages is it I haven't installed? and with what USE flag
8 > combination? )
9 >
10
11 Sure, if you assume that all libs must be checked because they all may
12 be broken despite all deps (at pkg level) are satisfied, this is a
13 difficult problem. But it is really a pessimistic assumption, no?
14 Cases such as openssl are not that numerous. Openssl is the only one I
15 can think of, and even if there are other, they are easy to detect a
16 systematic way.
17
18 If you agree on this, then all you need is something is to check that
19 this libs are installed in the right version. The two solutions i can
20 think of:
21
22 - you can do this with a strict dependency as suggested James (I
23 personnaly think it makes much sense and is a clean solution, now I
24 don't know how grp packages are built and if it is a problem for you to
25 have different ebuilds for them.)
26
27 - you can check the installed libs are okay it in pkg_preinst. Since
28 you specify explicitly what is the problematic libraries, you also know
29 from what pkg hey come and can report it to the user in case of failure.
30 Attached is a proof of concept eclass that implement a "checklib"
31 function you can use this way:
32
33 pkg_preinst() {
34 checklib libssl.so dev-libs/openssl || die
35 checklib libcrypto.so dev-libs/openssl || die
36 }
37
38 The behavior of checklib is to run ldd on all binaries of the package,
39 find linked libs that match the lib name pattern (for instance
40 "libssl.so"), and check they exist on system or will be installed. If
41 they are not, the user is asked to (re-)emerge the package named as 2nd
42 argument.
43 When the package is built from source, the check should never fail
44 (or there is a big problem in the build process). When installed from a
45 binary package, it will fail if the package is not compatible with your
46 system, and that's it.
47
48 What do you think of this second approach (not talking about the code
49 itself sure)?
50
51 --
52 TGL.

Attachments

File name MIME type
checklibs.eclass application/octet-stream

Replies

Subject Author
Re: [gentoo-dev] QA question wrg. GRP Paul de Vrieze <pauldv@g.o>