Issue #5831 has been updated by Derek Higgins.
We also hit this problem twice recently in the packstack project https://bugzilla.redhat.com/show_bug.cgi?id=981116 https://bugzilla.redhat.com/show_bug.cgi?id=971801 It would be great to see a fix for this. ---------------------------------------- Bug #5831: RPM provider should use --whatprovides to work with virtual packages https://projects.puppetlabs.com/issues/5831#change-94133 * Author: Adam Gray * Status: Code Insufficient * Priority: Low * Assignee: * Category: package * Target version: * Affected Puppet version: development * Keywords: * Branch: ---------------------------------------- RPM provides are ignored used in installation, but ignored in verification currently. The RPM provider calls "yum -y install blah" then "rpm -q blah", but if the package "blah-sweet-new-package" provides the package "blah," yum will install that if it has a higher version number. Howver, puppet will never think the "yum -y install blah" worked because "rpm -q blah" will never show anything, but "rpm -q --whatprovides blah" will list "blah-sweet-new-package." #rpm -q couchdb-lounge package couchdb-lounge is not installed #rpm -q couchdb-lounge2 package couchdb-lounge2 is not installed #rpm -q --whatprovides couchdb-lounge package couchdb-lounge is not installed #rpm -q --whatprovides couchdb-lounge2 package couchdb-lounge2 is not installed #puppetd -tvd --snip-- debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q couchdb-lounge --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} ' debug: //role_lounge/Package[couchdb-lounge]: Changing ensure debug: //role_lounge/Package[couchdb-lounge]: 1 change(s) debug: Package[couchdb-lounge](provider=yum): Ensuring => latest debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y install couchdb-lounge' debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q couchdb-lounge --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} ' err: //role_lounge/Package[couchdb-lounge]/ensure: change from absent to latest failed: Could not update: Could not find package couchdb-lounge at /home/adam/puppet-config/trunk/modules/role_lounge/manifests/init.pp:169 --end snip-- #rpm -q couchdb-lounge package couchdb-lounge is not installed #rpm -q couchdb-lounge2 couchdb-lounge2-2.1-3el5 #rpm -q --whatprovides couchdb-lounge couchdb-lounge2-2.1-3el5 #rpm -q --whatprovides couchdb-lounge2 couchdb-lounge2-2.1-3el5 Now I try again after making the attached patch: # yum remove \*lounge\* #rpm -q couchdb-lounge couchdb-lounge2 package couchdb-lounge is not installed package couchdb-lounge2 is not installed #rpm -q --whatprovides couchdb-lounge couchdb-lounge2 no package provides couchdb-lounge no package provides couchdb-lounge2 #puppetd -tvd --snip-- debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q couchdb-lounge --whatprovides --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} ' debug: //role_lounge/Package[couchdb-lounge]: Changing ensure debug: //role_lounge/Package[couchdb-lounge]: 1 change(s) debug: Package[couchdb-lounge](provider=yum): Ensuring => latest debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y install couchdb-lounge' debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q couchdb-lounge --whatprovides --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} ' notice: //role_lounge/Package[couchdb-lounge]/ensure: created --end snip-- #rpm -q couchdb-lounge couchdb-lounge2 package couchdb-lounge is not installed couchdb-lounge2-2.1-3el5 #rpm -q --whatprovides couchdb-lounge couchdb-lounge2 couchdb-lounge2-2.1-3el5 couchdb-lounge2-2.1-3el5 puppet master is Ubuntu 10.04.1 LTS and has puppet, puppet-common, and puppetmaster version 0.25.4-2ubuntu6, ruby1.8-1.8.7.249-2 installed puppet client is CentOS 5.5 and has puppet-0.24.8-4.el5 and ruby-1.8.5-5.el5_4.8 -- 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.
