[CentOS] Excluding ConsoleKit in kickstart

Tue May 15 21:10:51 UTC 2012
Dennis Jacobfeuerborn <dennisml at conversis.de>

On 05/15/2012 04:19 PM, Dennis Jacobfeuerborn wrote:
> On 05/15/2012 05:22 AM, me at tdiehl.org wrote:
>> On Tue, 15 May 2012, Dennis Jacobfeuerborn wrote:
>>
>>> Hi,
>>> I'm working on automating virtual machine installs using kickstart files
>>> and virt-install. The problem I have is that these kickstart installations
>>> install different packages than a minimal manual install. While I got rid
>>> of some of them I can't seem to prevent ConsoleKit from getting installed.
>>> I put "-ConsoleKit" in the packages section and later also added packages
>>> that require it but in the end it is still getting installed.
>>> Any ideas what I could do to stop it from being installed?
>>
>> You have to find the package that is pulling it in as a dependency and
>> exclude that. What I would try first is to do a yum erase ConsoleKit and
>> see what else it wants to erase. Then exclude those packages as well.
>>
>> I tried this on a headless machine I have running and got the following
>> results:
>>
>> Removing:
>>   ConsoleKit                 x86_64      0.4.1-3.el6              @anaconda-CentOS-201112102333.x86_64/6.2   263 k
>> Removing for dependencies:
>>   hal                        x86_64      0.5.14-11.el6            @anaconda-CentOS-201112102333.x86_64/6.2   1.2 M
>>   hal-info                   noarch      20090716-3.1.el6         @anaconda-CentOS-201112102333.x86_64/6.2   310 k
>>   pm-utils                   x86_64      1.2.5-9.el6              @anaconda-CentOS-201112102333.x86_64/6.2   254 k
>>   polkit                     x86_64      0.96-2.el6_0.1           @anaconda-CentOS-201112102333.x86_64/6.2   601 k
>>
>> While you might be able to run without polkit and pm-utils, I suspect that
>> you most likely want the hal packages.
> 
> That's what I tried and this worked with other packages that I have
> excluded but not for ConsoleKit. This is what my packages section looks like:
> 
> %packages
> @core
> @server-policy
> -mlocate
> -abrt*
> -mdadm
> -kexec-tools
> -prelink
> -readahead
> -hal
> -hal-info*
> -pm-utils
> -ConsoleKit*
> -polkit
> -libfprint
> %end
> 
> I excluded "abrt" but that got dragged in again by some sub-packages so I
> excluded "abrt*" instead and that works fine but even if I remove all the
> packages that pull in ConsoleKit after the installation and reboot I still
> see the console-kit-daemon running.
> 
> I'm not sure if I need hal. The default minimal installation of Centos 6
> doesn't include it so I don't think it's really necessary.

As an FYI I found out what was pulling this in and it was the fprintd
package (plus fprintd-pam). This pulls in libfprint but not as an explicit
dependeny but via an implicit dependency on the filename of the library.
After getting rid of this the number of installed packages went from 349 to
311. Apparently a few other packages like X libraries, gtk2, pango, cairo,
etc. got pulled in by this as well.

Regards,
  Dennis