Issue #16969 has been reported by Bill Stephens.
----------------------------------------
Bug #16969: RPM provider doesn't work in AIX
https://projects.puppetlabs.com/issues/16969
Author: Bill Stephens
Status: Unreviewed
Priority: Normal
Assignee:
Category: provider
Target version:
Affected Puppet version:
Keywords: aix rpm provider
Branch:
In AIX, the RPM that's provided is very old (3.0.5). I created the following
patch to the rpm.rb provider to allow it to work for aix:
***
/opt/puppet/pup-puppet/lib/ruby/site_ruby/1.8/puppet/provider/package/rpm.rb.orig
Mon Oct 15 11:58:07 2012
---
/opt/puppet/pup-puppet/lib/ruby/site_ruby/1.8/puppet/provider/package/rpm.rb
Mon Oct 15 12:46:48 2012
***************
*** 28,34 ****
# rpm < 4.1 don't support --nosignature
output = rpm "--version"
! sig = "--nosignature"
if output =~ /RPM version (([123].*)|(4\.0.*))/
sig = ""
end
--- 28,34 ----
# rpm < 4.1 don't support --nosignature
output = rpm "--version"
! sig = "--nosignature --nodigest"
if output =~ /RPM version (([123].*)|(4\.0.*))/
sig = ""
end
***************
*** 35,41 ****
# list out all of the packages
begin
! execpipe("#{command(:rpm)} -qa #{sig} --nodigest --qf
'#{NEVRAFORMAT}\n'") { |process|
# now turn each returned line into a package object
process.each_line { |line|
hash = nevra_to_hash(line)
--- 35,41 ----
# list out all of the packages
begin
! execpipe("#{command(:rpm)} -qa #{sig} --qf '#{NEVRAFORMAT}\n'") {
|process|
# now turn each returned line into a package object
process.each_line { |line|
hash = nevra_to_hash(line)
***************
*** 96,103 ****
flag = "-i"
flag = "-U" if @property_hash[:ensure] and @property_hash[:ensure] !=
:absent
- rpm flag, "--oldpackage", source
end
def uninstall
--- 96,109 ----
flag = "-i"
flag = "-U" if @property_hash[:ensure] and @property_hash[:ensure] !=
:absent
+ # rpm < 4.1 don't support --nosignature
+ output = rpm "--version"
+ if output =~ /RPM version (([123].*)|(4\.0.*))/
+ rpm flag, source
+ else
+ rpm flag, "--oldpackage", source
+ end
end
def uninstall
--
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.