What group does a package belong to?

In Fedora 13 distribution, how can one find what an install group a package belongs to? As an example, I would like to know what install group the package inkscape belongs to.

Using:

yum info inkscape

does not show the group information.

I know how to do this using a script which lists all groups and subsequently lists all the packages per group and greps the package of interest out of it. I'd like to know if it is possible to do this an easier way using an existing tool.


How about rpm -qi?

user@linux [~]# rpm -qi rpm
Name        : rpm                          Relocations: (not relocatable)
...
Group       : System Environment/Base       ...
....

Works for me.

Okay, I'm bored, here are some other options:

user@linux [~]# rpm -q --qf '%{GROUP}\n' rpm
System Environment/Base

For bonus points:

user@linux [~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}: %{GROUP}\n' rpm
rpm-4.3.3-33_nonptl.el4_8.1.i386: System Environment/Base

(Yeah, it's an old EL4 virtual box. It's what I had handy, so sue me.)

And now for the whole shebang:

user@linux [~]# rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}: %{GROUP}\n'
redhat-logos-1.1.26-1.centos4.4.noarch: System Environment/Base
basesystem-8.0-4.noarch: System Environment/Base
libcap-1.10-20.i386: System Environment/Libraries
gmp-4.1.4-3.i386: System Environment/Libraries
keyutils-1.0-2.i386: System Environment/Base
psmisc-21.4-4.1.i386: Applications/System
zlib-1.2.1.2-1.2.i386: System Environment/Libraries
pyxf86config-0.3.19-1.i386: System Environment/Libraries
passwd-0.68-10.1.i386: System Environment/Base
...

etc.