example42/puppet-yum

Updating puppet breaks with this module

Closed this issue · 2 comments

On stock CentOS 5:

  class { 'yum':
    clean_repos => true,
    extrarepo   => [ 'epel', 'puppetlabs' ],
  }

(/Stage[main]/Puppet/Package[puppet]/ensure) change from 2.6.17-2.el5 to 3.0.1-1.el5 failed: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet' returned 1: puppet-3.0.1-1.el5.noarch from puppetlabs has depsolving problems#012 --> Missing Dependency: ruby >= 1.8.7 is needed by package puppet-3.0.1-1.el5.noarch (puppetlabs)#012Error: Missing Dependency: ruby >= 1.8.7 is needed by package puppet-3.0.1-1.el5.noarch (puppetlabs)#12 You could try using --skip-broken to work around the problem#012 You could try running: package-cleanup --problems#012 package-cleanup --dupes#012 rpm -Va --nofiles --nodigest#012The program package-cleanup is found in the yum-utils package.#12 at /etc/puppet/environments/production/modules/puppet/manifests/init.pp:550

Ths is because puppet 3.0 requires Ruby >= 1.8.7 but only Ruby 1.8.5 is supplied in the distro. puppetlabs_dependencies contains the required Ruby, but is not allowed to override the base distro because of the priorities (base=1, puppetlabs_dependencies = 15).

It's fixed for me by disabling priorities, or by setting the puppetlabs_dependencies priority to match base (1).

I'm not sure what the 'proper' fix would be in your view, so I ask you. :)

Probably your suggestion to set puppetlabs repo priority to 1 is the most correct one... can you pull request the change ?

Should I

priority => $::osver ? { 5 => 1, # Puppet 3.0 requires Ruby => 1.8.7, but base is 1.8.5. Need to match priority to base to override. default => 15 }

or just

priority => 1 # Puppet 3.0 requires Ruby => 1.8.7, but base is 1.8.5. Need to match priority to base to override.