LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I find out what rpms are installed when Package Group Q is selected (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-find-out-what-rpms-are-installed-when-package-group-q-is-selected-642137/)

Mike Crowley 05-14-2008 09:50 AM

How do I find out what rpms are installed when Package Group Q is selected
 
When installing RedHat AS4 there is a page for Package Group Selection from which I can opt to have thinks like "Administration Tools" or "Text-based Internet" installed.

What I'd like to know is whether there is a way of finding out which rpms will be installed for a given package group. Or, to put it another way, given an package name is it possible to find out which package group it belongs to. I haven't been able to find anything appropriate in either the rpm or up2date man pages.

Regards, Mike :scratch:

Peacedog 05-14-2008 07:09 PM

Hi Mike Crowley, Welcome to lq. Is this what you're looking for?
Good luck. ;-)

unSpawn 05-14-2008 07:48 PM

Quote:

Originally Posted by Mike Crowley (Post 3152972)
finding out which rpms will be installed for a given package group.

Using your RPM installations "groups" file (it's at 'rpm -ql rpm | grep GROUPS') you get the group names. With 'yum' you can for instance 'yum grouplist "Applications/System"' to get a list of all packages in that group. To get a list of all installed packages sorted by group you can for instance do: 'cat `rpm -ql rpm | grep GROUPS`|while read GROUP; do echo "${GROUP}: "; rpm -qg "${GROUP}"|sort; echo; done'.


Quote:

Originally Posted by Mike Crowley (Post 3152972)
given an package name (..) find out which package group it belongs to.

'rpm --qf "%{GROUP}\n" -q package_name', where package_name is the name of the package (not "package-1.2.3").


Quote:

Originally Posted by Mike Crowley (Post 3152972)
rpm or up2date man pages.

See 'man rpm': "-g, --group".

Mike Crowley 05-15-2008 05:25 AM

Thanks for the swift replies, guys. The information you gave has been very useful.

unSpawn: I had seen the reference to [-g,--group GROUP] in the rpm man page but hadn't found any explanation of what GROUP stood for until now. Now that I know of the existence of /usr/share/doc/rpm-4.3.3/GROUPS I have been able to tie up packages with their GROUP using the command line you gave.

It is a pity, though, that RedHat haven't made this group list match the package group selection list displayed during installation.

peacedog: The web page you provided a link to matches (as far as i can recall) the installation selection page. Is that something you generated yourself or was it part of an installation? I don't have it, or anything like it, on my systems but they are built for a very reduced set of package groups.

Thanks again, Mike.

Peacedog 05-15-2008 07:10 AM

Quote:

peacedog: The web page you provided a link to matches (as far as i can recall) the installation selection page. Is that something you generated yourself or was it part of an installation? I don't have it, or anything like it, on my systems but they are built for a very reduced set of package groups.
Not my creation at all, I don't have a Redhat installation any longer. I just googled it up based on your question. There is more about the comps.xml here.
Good luck. ;-)


All times are GMT -5. The time now is 03:50 PM.