Created
March 30, 2012 16:27
-
-
Save perl2ruby/2252622 to your computer and use it in GitHub Desktop.
List all rpm packages in all groups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -lne ' puts %Q{==== group: "#{$_}" ====}; system %Q{rpm -qg "#{$_}"}' /usr/share/doc/rpm*/GROUPS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Official list of RPM groups are defined in /usr/share/doc/rpm*/GROUPS.
For example, /usr/share/doc/rpm-4.4.2.3 on centos contains:
Amusements/Games
Amusements/Graphics
Applications/Archiving
Applications/Communications
Applications/Databases
Applications/Editors
Applications/Emulators
Applications/Engineering
Applications/File
Applications/Internet
Applications/Multimedia
Applications/Productivity
Applications/Publishing
Applications/System
Applications/Text
Development/Debuggers
Development/Languages
Development/Libraries
Development/System
Development/Tools
Documentation
System Environment/Base
System Environment/Daemons
System Environment/Kernel
System Environment/Libraries
System Environment/Shells
User Interface/Desktops
User Interface/X
User Interface/X Hardware Support
The way to identify the list of packages in group 'System Environment/Shells' is:
rpm -qg 'System Environment/Shells'
which returns (depending on your machine) the following packages:
bash-3.2-24.el5
tcsh-6.14-17.el5_5.2
The ruby oneliner above shows the list of packages for each group.