On Mon, 2005-08-08 at 10:14 -0600, Orion Poplawski wrote:
Ian Pilcher wrote:
>
> If the files in question are binary executables or libraries, ldd should
> do what you want.
>
Yeah, I was hoping for something a little more ready to go. Does anyone
know what script/process is run during the rpmbuild that generates the
rpm dependecies, perhaps I can use/modify that...
That'd be /usr/lib/rpm/find-requires, it takes a list of filenames in
stdin and outputs the dependencies, eg
[pmatilai@weasel ~]$ echo /usr/bin/telnet | /usr/lib/rpm/find-requires
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libncurses.so.5()(64bit)
libutil.so.1()(64bit)
..and then you can further process that if you want, with rpmquery or
repoquery where appropriate:
[pmatilai@weasel ~]$ echo /usr/bin/telnet | /usr/lib/rpm/find-requires|
xargs rpm -q --whatprovides|sort -u
glibc-2.3.5-10
ncurses-5.4-17
- Panu -