LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-02-2011, 07:50 AM   #1
g3kk0
LQ Newbie
 
Registered: Sep 2011
Posts: 2

Rep: Reputation: Disabled
Full dependency list via RPM/YUM


Hi,

I've been trying to find a way to generate a full list of dependencies (including sub-dependencies) of a RPM package.

e.g.

repoquery --requires --resolve httpd

mktemp-3:1.5-23.2.2.x86_64
mailcap-0:2.1.23-1.fc6.noarch
libselinux-0:1.33.4-5.7.el5.x86_64
httpd-0:2.2.3-45.el5.centos.x86_64
apr-0:1.2.7-11.el5_5.3.x86_64
glibc-0:2.5-58.i686
expat-0:1.95.8-8.3.el5_5.3.x86_64
openssl-0:0.9.8e-12.el5_5.7.x86_64
gawk-0:3.1.5-14.el5.x86_64
pcre-0:6.6-6.el5.x86_64
shadow-utils-2:4.0.17-18.el5.x86_64
coreutils-0:5.97-23.el5_4.2.x86_64
openldap-0:2.3.43-12.el5_5.3.x86_64
zlib-0:1.2.3-3.x86_64
findutils-1:4.2.27-6.el5.x86_64
file-0:4.17-15.el5_3.1.x86_64
apr-util-0:1.2.7-11.el5_5.2.x86_64
chkconfig-0:1.3.30.2-2.el5.x86_64
db4-0:4.3.29-10.el5_5.2.x86_64
bash-0:3.2-24.el5.x86_64
initscripts-0:8.45.33-1.el5.centos.x86_64

This command lists the dependencies of the httpd package but I'd like the list to include the dependencies of these dependencies too.

I've had a look through all the yum addons and arguments available to RPM but am still no clearer how to find this information out.

Is it possible?


Thanks

Mark
 
Old 09-02-2011, 10:25 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you can script it to take that output and loop through it, getting the deps of those

BUT

Do you really want that?

If you're not comparing this to the target systems current state you'll soon get back to dependencies for a kernel, glibc and all the other absolute base requirements for the entire system. How useful is that?
 
Old 09-05-2011, 03:56 PM   #3
g3kk0
LQ Newbie
 
Registered: Sep 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
That sounds exactly like what I want to do.

I've done some further research on this and think a recursive function within a bash script is the answer.

Been trying to knock something together but and stuggling a bit (bash scripting isn't my strongest point).

Basically I looking to generate a list of dependencies for a package (such as httpd above). This list needs to contain dependencies aswell as sub dependencies of the dependencies until none are left. Ideally I don't want duplicates in the list as running repoquery on some package return themselves (such as mailcap).

Base requirement packages such a kernel, glibc are fine.


Thank you for your time
 
Old 09-05-2011, 04:18 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you can probably knock something up in just a dozen lines, as finding the second level deps of the input package would be just a case of running the script against all of the results from the previous stage it'd all be pretty slick and simple. Only issue would be mutual dependencies, which *could* end up in an infinite loop if you're not careful. things like making it unique is pretty trivial, just run the output through uniq at the end etc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get full list of dependencies? (RPM) adisan82 Linux - Software 2 01-26-2011 07:29 AM
[SOLVED] where do i find a list of rpm and yum apps? linux/unix87 Linux - Newbie 21 11-18-2010 01:16 PM
LXer: The next horizon: How Red Hat used yum to overcome RPM dependency hell (video) LXer Syndicated Linux News 0 09-21-2007 07:50 AM
rpm/yum don't list the mysql I've just installed Swakoo Linux - General 5 04-20-2007 04:36 AM
Is there a recommended list of RPM repositaries that can be used with YUM? Akhran Linux - Newbie 2 04-02-2006 03:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration