On Tue, May 28, 2013 at 3:57 AM, bjoern pohl <pohlbjo...@googlemail.com>wrote:
> Hi, > hopefully this hasn't been discussed too often, haven't found anything in > the group: > > I'm having some issues when a package gets installed twice ( x86 & x64 > version). > #system is a RHEL5/x64 system. > *#following manifest:* > [root@kermit ~]# cat install_expect.pp > package { 'expect': > ensure => present, > } > *#ok, let's apply* > [root@kermit ~]# puppet apply install_expect.pp > Notice: /Stage[main]//Package[expect]/ensure: created > Notice: Finished catalog run in 14.25 seconds > > *#let's see what we've got* > [root@kermit ~]# rpm -qa|grep expect > expect-5.43.0-8.el5 > expect-5.43.0-8.el5 > *#so we have two versions installed ( in fact it's the x64 and x86 > version. for whatever reason yum installs both ( it's yum, a dry-run with > yum results in the same situation) > #I would not have expected this for expect ( :) ) , but for libs that's > normal on an x64 system.* > * > #ok, lets uninstall expect* > [root@kermit ~]# cat uninstall_expect.pp > package { 'expect': > ensure => absent, > } > [root@kermit ~]# puppet apply uninstall_expect.pp > Notice: /Stage[main]//Package[expect]/ensure: removed > Notice: Finished catalog run in 0.27 seconds > > [root@kermit ~]# rpm -qa|grep expect > expect-5.43.0-8.el5 > *#here's my problem - there's still one left.* > > *#2nd run:* > [root@kermit ~]# puppet apply uninstall_expect.pp > Notice: /Stage[main]//Package[expect]/ensure: removed > Notice: Finished catalog run in 0.61 seconds > [root@kermit ~]# rpm -qa|grep expect > [root@kermit ~]# > *#now it's completely absent* > > Any Idea how I can avoid multiple runs to completely remove it ( so, > basically what rpm -e --allmatches <rpm> would do )? > The behavior you are seeing is actually the one noted in the provider code[1]. I'm not sure why it was implemented this way since removing both seems to be the correct action. I would open a ticket since this requires a change to the rpm package provider. Thanks, Nan 1. https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/rpm.rb#L120-L124 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.