Issue #3707 has been updated by Yvo van Doorn.

Affected Puppet version changed from 0.25.4 to 2.6.12

Still present in 2.6.12.

In order to avoid a circular dependency that is bugged in 2198, I have the 
following setup:
"httpd-2.2.21" :
        alias => "httpd-current",
        provider => rpm,
        source => 
"http://${yumrepo}/asd-repo-6/${architecture}/httpd-2.2.21-2.el6.${architecture}.rpm";,
        require => [Package['apr-devel'], Package['expat-devel'], 
Package['apr-util-devel'], Package['apr-util-ldap'], 
Package['httpd-tools-2.2.21']],
        ensure => '2.2.21-2.el6';
}
package {
"httpd-tools-2.2.21" :
        provider => rpm,
        source => 
"http://${yumrepo}/asd-repo-6/${architecture}/httpd-tools-2.2.21-2.el6.${architecture}.rpm";,
        require => [Package['apr-devel'], Package['expat-devel'], 
Package['apr-util-devel'], Package['apr-util-ldap']],
        ensure => '2.2.21-2.el6';
}
# Get rid of the old and it is dirty due to circular dependency
package {
"httpd-tools-2.2.15" :
        alias => "httpd-tools",
        provider => yum,
        ensure => purged,
        notify => Package['httpd-tools-2.2.21'];
}
package {
"httpd-2.2.15" :
        alias => "httpd",
        provider => yum,
        ensure => purged,
        notify => Package['httpd-2.2.21'];
}

Whenever puppet runs on the client it reports:
[yvo.vandoorn@xxx ~]$ sudo -H /usr/sbin/puppetd -t --environment=yvov          
info: Retrieving plugin
info: Loading facts in mysql
info: Loading facts in mysql
info: Caching catalog for xxx
info: Applying configuration version '1321312363'
notice: /Stage[main]/Puppet::Client/Exec[touch last_run file]/returns: executed 
successfully
notice: /Stage[main]/Apache::Server/Package[httpd-2.2.15]/ensure: created
notice: /Stage[main]/Apache::Server/Package[httpd-tools-2.2.15]/ensure: created
notice: Finished catalog run in 7.68 seconds

Be great to get this one fixed!
----------------------------------------
Bug #3707: Yum provider "purge" target runs irrespective of package 
installation status
https://projects.puppetlabs.com/issues/3707

Author: Oliver Hookins
Status: Code Insufficient
Priority: Normal
Assignee: David  Lutterkort
Category: package
Target version: 
Affected Puppet version: 2.6.12
Keywords: 
Branch: 


It seems the yum provider will try to purge an absent package:
<pre>
[root@test ~]# cat test.pp 
package { logwatch: ensure => purged; }

[root@test ~]# /bin/rpm -q logwatch --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'
package logwatch is not installed

[root@test ~]# puppet -d -v test.pp 
debug: Puppet::Type::Package::ProviderRpm: Executing '/bin/rpm --version'
debug: Puppet::Type::Package::ProviderUrpmi: Executing '/bin/rpm -ql rpm'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm --version'
debug: Puppet::Type::Package::ProviderAptrpm: Executing '/bin/rpm -ql rpm'
debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/portupgrade 
does not exist
debug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude does not 
exist
debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does 
not exist
debug: Puppet::Type::Package::ProviderApt: file /usr/bin/apt-get does not exist
debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not 
exist
debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
debug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not exist
debug: Puppet::Type::Package::ProviderSun: file /usr/sbin/pkgrm does not exist
debug: Puppet::Type::Package::ProviderAptrpm: file apt-get does not exist
debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swremove does not 
exist
debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info does not 
exist
debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not exist
debug: Creating default schedules
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does 
not exist
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring 
File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring 
File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl/certs/test.pem]: Autorequiring 
File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring 
File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl/public_keys/test.pem]: Autorequiring 
File[/var/lib/puppet/ssl/public_keys]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys/test.pem]: Autorequiring 
File[/var/lib/puppet/ssl/private_keys]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: Finishing transaction 23973287885200 with 0 changes
debug: Prefetching yum resources for package
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm --version'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -qa 
--nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} 
%{RELEASE} %{ARCH}
''
info: Applying configuration version '1272893121'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q logwatch 
--nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} 
%{RELEASE} %{ARCH}
'
debug: //Package[logwatch]: Changing ensure
debug: //Package[logwatch]: 1 change(s)
debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -y erase 
logwatch'
notice: //Package[logwatch]/ensure: created
debug: Finishing transaction 23456258088960 with 1 changes
</pre>



-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to