| Red Hat This forum is for the discussion of Red Hat Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
10-08-2009, 05:55 PM
|
#1
|
|
Member
Registered: Aug 2003
Location: Berkeley, California, USA
Distribution: Red Hat Enterprise Linux, Debian & Ubuntu
Posts: 92
Rep:
|
Yum: What "Package Group" can provide a package?
Yum supports the idea of "Package groups". Here's a listing of available groups on my RHEL5.4 system, after a vanilla installation:
Code:
[root@host1 ~]# yum grouplist
Loaded plugins: rhnplugin, security
Setting up Group Process
Installed Groups:
Editors
Legacy Network Server
Mail Server
Network Servers
System Tools
Available Groups:
Administration Tools
Authoring and Publishing
DNS Name Server
...
...
Is there a way to tell which Package Groups will provide a particular individual package?
For example, "emacs" is provided by the "Editor" package group, the "Development Environment" package group, and possibly others. I'm looking for a theoretical command like "yum groupinfo-whatprovides emacs"?
Here's what I am doing right now, to query all of the package groups for the 'httpd' package. This is a little clunky, and I was looking for a simpler method.
Code:
[root@host1 ~]# yum grouplist >/tmp/yum.grouplist
[root@host1 ~]# cat /tmp/yum.grouplist |while read GROUP; do echo GROUP=$GROUP; yum groupinfo "$GROUP" |grep -i httpd; done
GROUP=Editors
GROUP=Legacy Network Server
...
...
GROUP=Server Configuration Tools
system-config-httpd
GROUP=Sound and Video
GROUP=Text-based Internet
GROUP=Web Server
httpd
httpd-manual
httpd-suexec
GROUP=Windows File Server
GROUP=X Software Development
GROUP=X Window System
Thank you,
-= Stefan
|
|
|
|
10-08-2009, 08:20 PM
|
#2
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 14,993
|
Well, I think you can eliminate the unwanted groups
Code:
yum grouplist >/tmp/yum.grouplist
for GROUP in `cat /tmp/yum.grouplist`
do
name=`yum groupinfo "$GROUP" |grep -i httpd`
if [[ $? -eq 0 ]] # $? is status of last cmd in pipe ie matched
then
echo $GROUP = $name
fi
done
It's theoretically possible for the same pkg to turn up in many groups; don't know how often it happens.
Don't know if this page may inspire a different approach http://kbase.redhat.com/faq/docs/DOC-2531 ?
|
|
|
1 members found this post helpful.
|
10-09-2009, 04:43 PM
|
#3
|
|
Member
Registered: Aug 2003
Location: Berkeley, California, USA
Distribution: Red Hat Enterprise Linux, Debian & Ubuntu
Posts: 92
Original Poster
Rep:
|
Thanks Chris.
It looks like RHEL does not support this feature. It's probably not a big deal, since it looks like RedHat has cleaned up the Package Groups in RHEL5. With RHEL4, there is more duplication.
Thanks again,
-= Stefan
|
|
|
|
11-14-2010, 06:49 PM
|
#4
|
|
LQ Newbie
Registered: Nov 2010
Posts: 1
Rep:
|
Updated for rhel6
rhel 6 has some weird group names, there are spaces in the generic names. I added some sed magic to handle that, or at least most of it. This script will workfor all but:
English (UK) Support
Myanmar (Burmese) Support
Some smarter awkery would solve that, but I don't care enough. Save the following as a script and run it as root with one arg, the package you want to search for:
Code:
#!/bin/bash
yum grouplist -v | grep "^ " | cut -f 2 -d \( | sed -e "s/)//" > /tmp/yum.grouplist
for GROUP in `cat /tmp/yum.grouplist`
do
name=`yum groupinfo "$GROUP" |grep -i $1`
if [[ $? -eq 0 ]] # $? is status of last cmd in pipe ie matched
then
echo $GROUP = $name
fi
done
rm /tmp/yum.grouplist
A
|
|
|
|
03-07-2012, 12:49 PM
|
#5
|
|
LQ Newbie
Registered: Mar 2012
Posts: 1
Rep: 
|
amacks, I found your post very helpful. I modified your script somewhat because there were a couple things that didn't work quite right yet. One I saw problem with RHEL 5.5 and another with RHEL 6.1.
For RHEL 5.5, the 'yum grouplist -v' portion of the command produces the following for one of the groups:
KDE (K Desktop Environment) (kde-desktop)
So the rest of the processing turns this into "K Desktop Environment" instead of "kde-desktop". I used a little awk to fix that one.
For RHEL 6.1 I didn't like that all the languages are listed and time is spent looking through them. 99.9%+ of the time I will not be looking for something in a language group, so I eliminated them with a little more grep to eliminate them, which all seemed to have [text] associated with them.
The net change to your code looks like this:
Code:
#!/bin/bash
yum grouplist -v | grep "^ " | grep -v "]$" | awk '{print $NF}' | sed -e "s/(//" | sed -e "s/)//" > /tmp/yum.grouplist
for GROUP in `cat /tmp/yum.grouplist`
do
name=`yum groupinfo "$GROUP" 2>&1 | grep -i $1`
if [[ $? -eq 0 ]] # $? is status of last cmd in pipe ie matched
then
echo $GROUP : $name
fi
done
rm /tmp/yum.grouplist
Hope someone else finds this useful,
Kevin
|
|
|
|
03-11-2012, 07:38 PM
|
#6
|
|
LQ Newbie
Registered: Mar 2012
Location: California
Distribution: RHEL6
Posts: 26
Rep: 
|
Hey,
I'm befuddled here.. I paid for RHEL6 so I am hoping to get things like Ghex and Gcalctools 2.6 going and I see that yum bails (fails) with broken dependancies.
Is this Group thing a way to install all the needed packages for say Gnome?
Or other stuff?
I am looking at manually installing like 40 packages just to get a couple of dependancies resolved for Ghex and Gcalctool 2.6
Who know how many other dependancies will pop up.
Yes I am a previous Fedora user and pampered with Yum fetching and installing everything without me bothering.
I found the "Groupinstall" function for YUM and install "Compatability Libraries" didn't solve the configure: error: glib-compile-schemas not found.
I'm still looking..
This is frustrating.
Last edited by Ernst0; 03-11-2012 at 08:08 PM.
|
|
|
|
06-12-2012, 05:34 PM
|
#7
|
|
LQ Newbie
Registered: Jun 2012
Posts: 1
Rep: 
|
On CentOS 6.2 (RHEL 6.2) it's simple:
# yum groupinfo \*
|
|
|
|
03-21-2013, 01:31 PM
|
#8
|
|
LQ Newbie
Registered: Apr 2012
Posts: 3
Rep: 
|
For search engines: now the yum-list-data plugin can be used for the subject issue:
Code:
$ yum -C list-groups yum
...
==================== Installed Packages ====================
Core 1 ( 50%)
Critical Path (Base) 1 ( 50%)
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:01 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|