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

Notices

Tags used in this thread
Popular LQ Tags , , ,

Reply
 
Thread Tools
Old 10-08-2009, 06:55 PM   #1
stefanlasiewski
Member
 
Registered: Aug 2003
Location: Berkeley, California, USA
Distribution: Red Hat Enterprise Linux, Debian & Ubuntu
Posts: 91
Thanked: 0
Yum: What "Package Group" can provide a package?


[Log in to get rid of this advertisement]
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
macos stefanlasiewski is offline  
Tag This Post , , ,
Reply With Quote
Old 10-08-2009, 09:20 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,419
Thanked: 325
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 ?
windows_xp_2003 chrism01 is offline     Reply With Quote
Old 10-09-2009, 05:43 PM   #3
stefanlasiewski
Member
 
Registered: Aug 2003
Location: Berkeley, California, USA
Distribution: Red Hat Enterprise Linux, Debian & Ubuntu
Posts: 91
Thanked: 0

Original Poster
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
macos stefanlasiewski is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Can't locate object method "splitpath" via package "PACK001" at /usr/lib/perl5/5.8.8/ sajigeorge Linux - Software 1 01-11-2009 07:33 AM
Which Flash Package? "Flashplugin-nonfree" or "flashplayer-mozilla" Zaskar Debian 3 04-02-2008 03:15 AM
perl install error: Can't locate object method "new" via package "Module::Build::Vers powah Linux - Software 0 10-24-2006 02:57 PM
How to list/remove the "package group" in RedHat linux ES 3.0? ajegu Linux - Software 1 06-25-2004 01:12 PM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 10:59 AM


All times are GMT -5. The time now is 05:41 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration