Date: Fri, 18 May 2007 16:04:41 +0200 From: Michel Talon <talon@lpthe.jussieu.fr> To: Benjamin Lutz <mail@maxlor.com> Cc: freebsd-ports@freebsd.org Subject: Re: Specs for saving old shared libs Message-ID: <20070518140441.GA17685@lpthe.jussieu.fr>
next in thread | raw e-mail | index | archive | help
Benjamin Lutz wrote: > > Benjamin Lutz writes: > > > The last part seems to be the catch here. How about providing a > > > tool that scans all binaries in the standard locations for what > > > libs they depend on, and also allows the user/admin to specify > > > the paths to binaries that he installed on his own, then outputs > > > a list of unused libraries? > > > > Are you aware of "libchk" and "portsclean"? > > Oh. No, I wasn't. Well, I guess that solves this problem then :) Not completely because some programs install shared libraries in very non standard places, notably perl installs perl.so like this: /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so or mozilla installs mozilla libs in another strange place. And there are other ports which make use of such shared libraries, for example Gnome depends on the mozilla libs or inn depends on perl.so. Hence the only correct solution is to scan all files in a port, and determine if any of them is a shared library to keep a copy of it. This is what portupgrade does, as well as Cyrille Szymanski's pkg_save: http://www.lpthe.jussieu.fr/~talon/pkg_save.py The important point is: what do you do with shared libraries you have saved? Either you put them in /usr/local/lib/compat like portupgrade does, and you run ldconfig here, then there is no problem with these libraries but you have no real way to discover which are necessary, which are not (libchk cannot assert that since it looks only in standard places) or you can say like portmaster, i don't want to rely on this mechanism, you keep your copy and use it only in case some library is really missing and you don't know how to solve the problem in another way. -- Michel TALON
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070518140441.GA17685>