On Sat, 2005-08-13 at 23:26 -0400, Mike Frysinger wrote:
> i've already contacted fuzzray about utilizing two packages solar put 
> together 
> (and can be found in portage already):
> pax-utils: scanelf
> portage-utils: qfile

Thanks for the ideas.

I had a quick look at the programs;

qfile: This would be useful in cleaning up the the last part of finding
which package the file belongs to. But that part is already fairly quick
compared to the rest.

scanelf: 

>From what I can see scanelf can print what libraries a file needs but it
cannot say if the libraries are present.  For example:

/usr/bin/scanelf /bin/ls -n
 TYPE   NEEDED FILE
ET_EXEC librt.so.1,libncurses.so.5,libc.so.6 /bin/ls

So you would need to keep a list of all libraries to check against.
Thus I prefer using:
LD_TRACE_LOADED_OBJECTS=1 /lib/ld-linux.so.2 /bin/ls

But you could use "ldconfig -p" to gain a list of all the libraries, put
them in a hash table and then use scanelf.

All seems good,

Stefan

-- 
Stefan Jones <[EMAIL PROTECTED]>

-- 
[email protected] mailing list

Reply via email to