I would like data on how to replicate the same exact outcome for

yum groupinstall "Printing client"

without running that command but rather run

yum install <package> -y

perhaps multiple times.

i understand i can get the name of each package via

yum groupinfo "Printing client"

but which ones are suppose to be installed given that it lists 3 different categories : Mandatory, Default, and Optional Packages.

how can one know how to install them in a "orderly fashion" using

 yum install

so that it replicates the same exact outcome as the original

 yum groupinstall "Printing client" ?

My system is a little dated, Fedora 14, so I don't have that group, but I do have this group "Printing Support", but I believe my examples are still relevant to your question.

As you've already mentioned, you can use the command yum groupinfo <group name> to find out what packages are provided by a particular group. As to installing them I would assume that you have to install all the "Mandatory" and "Default" packages. This could be done like so.

The yum.conf parameter, group_package_types controls which types get installed.

excerpt man yum.conf

group_package_types List of the following: optional, default, mandatory. 
   Tells yum which type of packages in groups will be installed when 
   'groupinstall' is called.   
   Default is: default, mandatory


You could run these commands to get the list of packages:


$ yum groupinfo "Printing Support" | paste -s -d ' '| \
        grep -oP '(?<=tory Packages:\s{4}).*(?=Default Packages:\s+)' | \
        sed 's/[\t ]\+/ /g'
cups ghostscript ghostscript-cups 


$ yum groupinfo "Printing Support" | paste -s -d ' '| \
        grep -oP '(?<=Default Packages:\s{4}).*(?=Optional Packages:\s+)' | \           sed 's/[\t ]\+/ /g'
bluez-cups cups-pk-helper foomatic foomatic-db-ppds foomatic-filters gutenprint gutenprint-cups hpijs hplip mpage paps printer-filters samba-client system-config-printer system-config-printer-udev 

You could then store these 2 commands in 2 variables:

$ mpkgs=$(yum groupinfo "Printing Support" ....)
$ dpkgs=$(yum groupinfo "Printing Support" ....)

And then run yum like so:

$ yum install -y $mpkgs $dpkgs

When you present all the packages to yum like this it can figure out the whether the dependencies are met without you having to worry about presenting the correct set of packages during each invoke.

  • +1 The only thing I would add is that the group_package_types parameter in yum.conf specifies which packages get installed by groupinstall. Sep 5 '13 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.