Issue #5456 has been updated by Mark McKinstry.
I'm also affected by this bug. The main problem is puppet uses yum to install packages and rpm to verify a package is installed. yum understands the 'provides' part of an RPM, but the rpm command used by puppet doesn't. In terms of what puppet should do when a package is installed which provides something requested, it should do nothing as Michael said since the the requirement for the package is fulfilled. In terms of what it should do if no package is installed, puppet should let yum figure out what to install. Newer versions of yum will install according to this: http://yum.baseurl.org/wiki/CompareProviders . In terms of a unit test, I'm not sure what you're looking for but 'php-common' provides 'php-calendar' on Fedora and CentOS 5 and 6. I can't imagine php-calendar will be broken off in to a separate package or removed from PHP any time soon so it has some futerproof built in if you use it for a unit test. ---------------------------------------- Feature #5456: package type should accept virtual package for rpm https://projects.puppetlabs.com/issues/5456#change-100175 * Author: Michael Scherer * Status: Accepted * Priority: Normal * Assignee: * Category: package * Target version: * Affected Puppet version: 2.6.4 * Keywords: * Branch: ---------------------------------------- Rpm ( like many similar package systems ) define a system of virtual package, with the tag Provides. For example, on Mandriva, we have : $ rpm -q --provides perl-Term-Size-Any-0.1.0-2mdv2010.1 perl(Term::Size::Any) = 0.1.0 perl-Term-Size-Any = 0.1.0-2mdv2010.1 So I can use "urpmi perl(Term::Size::Any)" to install the rpm. On puppet, the type package do not seem to take this fully in account. if I use this : package { 'perl(Term::Size::Any)': ensure => installed } The package is installed, but I see a error message : err: /Stage[main]//Node[valstar]/Package[perl(Term::Size::Any)]/ensure: change from absent to present failed: Could not find package perl(Term::Size::Any) Here is a patch that fix this. It should allows to use any Provides for all rpm based package managers, but I only checked with urpmi and yum. It should work ok on all of them, since using a Provides instead of the exact rpm name is a very common feature. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
