# File lib/puppet/provider/package/yum.rb, line 51
51:   def install
52:     should = @resource.should(:ensure)
53:     self.debug "Ensuring => #{should}"
54:     wanted = @resource[:name]
55: 
56:     # XXX: We don't actually deal with epochs here.
57:     case should
58:     when true, false, Symbol
59:       # pass
60:       should = nil
61:     else
62:       # Add the package version
63:       wanted += "-#{should}"
64:     end
65: 
66:     output = yum "-d", "0", "-e", "0", "-y", :install, wanted
67: 
68:     is = self.query
69:     raise Puppet::Error, "Could not find package #{self.name}" unless is
70: 
71:     # FIXME: Should we raise an exception even if should == :latest
72:     # and yum updated us to a version other than @param_hash[:ensure] ?
73:     raise Puppet::Error, "Failed to update to version #{should}, got version #{is[:ensure]} instead" if should && should != is[:ensure]
74:   end