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