5

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.

Mansour
  • 499
  • 2
  • 7
  • 14

1 Answers1

4

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.

BMDan
  • 7,249
  • 2
  • 23
  • 34
  • Thanks - this was very helpful and put me on the right track. – Mansour Oct 01 '10 at 02:41
  • What I actually wanted was to query the repository - for instance, using rpm requires the package to be installed. I found repoquery tool which does the same thing over the entire list of packages available from the repository. – Mansour Oct 01 '10 at 02:42
  • what about non-installed packages? repoquery can help. but @group notation is confusing for as in trying to find out the group ID (@ part) of Applications/Editors... –  Mar 29 '18 at 05:43