# File lib/puppet/provider/package/rpm.rb, line 25
25:     def self.instances
26:         packages = []
27: 
28:         # rpm < 4.1 don't support --nosignature
29:         output = rpm "--version"
30:         sig = "--nosignature"
31:         if output =~ /RPM version (([123].*)|(4\.0.*))/
32:             sig = ""
33:         end
34: 
35:         # list out all of the packages
36:         begin
37:             execpipe("#{command(:rpm)} -qa #{sig} --nodigest --qf '#{NEVRAFORMAT}\n'") { |process|
38:                 # now turn each returned line into a package object
39:                 process.each { |line|
40:                     hash = nevra_to_hash(line)
41:                     packages << new(hash)
42:                 }
43:             }
44:         rescue Puppet::ExecutionFailure
45:             raise Puppet::Error, "Failed to list packages"
46:         end
47: 
48:         return packages
49:     end