On Friday 18 May 2007 09:50, Peter Jeremy wrote: > On 2007-May-17 23:31:57 +0200, Pav Lucistnik <[EMAIL PROTECTED]> wrote: > >Just before old package deinstall, scan the list of files installed > > by old port (pkg_info -g). Match .so.X files under PREFIX/lib and > > any ldconfig'ed paths 1*), copy them away to > > /usr/local/lib/compat/pkg. > > > >After installation of new port, match .so.X files again. If same > >filenames appear, remove old copies from /usr/local/lib/compat/pkg. > > > >Finally, ldconfig -r /usr/local/lib/compat/pkg > > Ideally, you also need some way to identify (and remove) old .so > files that are no longer referenced by anything. This is not as easy > because there's no record of what ports use what .so's (and no way to > track apps outside the ports system).
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? This could be just another ports-mgmt tool (and incidentally, I've written scripts that do this several times already (none of them are worthy of publication though, they're just quick hacks)). Cheers Benjamin
pgpIIg1cl3E27.pgp
Description: PGP signature