Gentoo Archives: gentoo-user

From: Willie Wong <wwong@××××××××××××××.edu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Finding orphaned libs
Date: Mon, 08 Jun 2009 23:28:43
Message-Id: 20090608233122.GA30512@princeton.edu
In Reply to: Re: [gentoo-user] Finding orphaned libs by Neil Bothwick
1 On Mon, Jun 08, 2009 at 09:54:08PM +0100, Penguin Lover Neil Bothwick squawked:
2 > On Mon, 8 Jun 2009 22:44:18 +0200, Alan McKinnon wrote:
3 >
4 > > Is there an easy way to detect the orphaned libs on and old machine
5 > > who's install dates back to 2004? The only idea I can come up with is
6 > >
7 > > for I in /usr/lib/*.so.* ; do equery belongs $I ; done
8 >
9 > qfile --orphans /usr/lib/*.so.*
10 >
11 > or, maybe cleaner
12 >
13 > qfile --orphans $(find -H /usr/lib /lib -type f)
14 >
15 > which avoids checking all the symlinks.
16 >
17 > Then run symlinks remove any dangling links left over.
18
19 Whoa, that's useful. Thanks for Neil for giving the solution, and to
20 Alan for even asking the question. Having a box whose install dates to
21
22 sep~ # head /var/log/emerge.log
23 Started emerge on: Nov 03, 2002
24 *** emerge >=sys-apps/baselayout-1.7.9-r1 >=sys-apps/texinfo-4.2-r1 sys-devel/gettext >=sys-devel/binutils-2.13.90.0.4 >=sys-devel/gcc-3.2
25 >>> emerge (1 of 7) sys-apps/baselayout-1.8.4.1 to /
26 ::: completed emerge (1 of 7) sys-apps/baselayout-1.8.4.1 to /
27 >>> emerge (2 of 7) sys-apps/texinfo-4.2-r5 to /
28
29 This seems to be a worthy enterprise.
30
31 BTW, though, $(find -H ...) will have too big a list. Perhaps better
32 to do
33
34 find -H /usr/lib /lib -type f | xargs qfile -o
35
36 W
37 --
38 When my cats aren't happy, I'm not happy. Not because I care about their mood
39 but because I know they're just sitting there thinking up ways to get even.
40 ~Penny Ward Moser
41 Sortir en Pantoufles: up 913 days, 22:12

Replies

Subject Author
Re: [gentoo-user] Finding orphaned libs Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)