Re: getting all dependencies recursively

Paul Nasrat <pauln-xGvoirzvwgBWk0Htik3J/[email protected]> Mon, 5 Apr 2004 19:16:10 +0000
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <[email protected]>
On Mon, Apr 05, 2004 at 09:07:09PM +0200, Armijn Hemel wrote:
> hello,
> 
> the last few weeks I've been busy trying to hack (yes, really hack, as
> it is very ugly code) on a program that does the following:
> 
> "given a package name, find all packages the package depends on
> recursively" (assuming a database with all the package information is
> available).
> 
> So for example if I'd need the dependencies for "mutt" it would go all
> the way down to glibc-common, basesystem, etc.
> 
> Such a program would be very convenient for example if you want to
> install a program in a chroot environment with RPM (with --root) and want
> to know all packages it needs.
> 
> I just found out that, of course, I was doing completely the wrong
> thing, and thought that maybe it would be wise to ask if such a program
> already exists :)
> 
> So, does such a program already exist? :D

Yum supports --root so you could do

mkdir -p /some/where/root/var/lib/rpm
rpm --root /some/where/root --initdb
yum --root /some/where/root install mutt

That should all work OTOH, just set your yum.conf up with at your repo, and run yum-arch over it.

Paul