Sha256: 1ef592cfd23ea8e5bb8583130b32da12d6b8cd078229b3b526c38b15b05d10e5

Contents?: true

Size: 1.05 KB

Versions: 42

Compression:

Stored size: 1.05 KB

Contents

Puppet::Type.type(:package).provide :up2date, :parent => :rpm, :source => :rpm do
  desc "Support for Red Hat's proprietary `up2date` package update
    mechanism."

  commands :up2date => "/usr/sbin/up2date-nox"

  defaultfor :operatingsystem => [:redhat, :oel, :ovm],
    :lsbdistrelease => ["2.1", "3", "4"]

  confine    :operatingsystem => [:redhat, :oel, :ovm]

  # Install a package using 'up2date'.
  def install
    up2date "-u", @resource[:name]

    unless self.query
      raise Puppet::ExecutionFailure.new(
        "Could not find package #{self.name}"
      )
    end
  end

  # What's the latest package version available?
  def latest
    #up2date can only get a list of *all* available packages?
    output = up2date "--showall"

    if output =~ /^#{Regexp.escape @resource[:name]}-(\d+.*)\.\w+/
      return $1
    else
      # up2date didn't find updates, pretend the current
      # version is the latest
      return @property_hash[:ensure]
    end
  end

  def update
    # Install in up2date can be used for update, too
    self.install
  end
end

Version data entries

42 entries across 42 versions & 4 rubygems

Version Path
puppet-parse-0.1.4 lib/vendor/puppet/provider/package/up2date.rb
puppet-parse-0.1.3 lib/vendor/puppet/provider/package/up2date.rb
puppet-parse-0.1.2 lib/vendor/puppet/provider/package/up2date.rb
puppet-parse-0.1.1 lib/vendor/puppet/provider/package/up2date.rb
puppet-2.7.26 lib/puppet/provider/package/up2date.rb
puppet-2.7.25 lib/puppet/provider/package/up2date.rb
puppet-2.7.24 lib/puppet/provider/package/up2date.rb
puppet-2.7.23 lib/puppet/provider/package/up2date.rb
puppet-2.7.22 lib/puppet/provider/package/up2date.rb
puppet-parse-0.1.0 lib/vendor/puppet/provider/package/up2date.rb
puppet-parse-0.0.6 lib/vendor/puppet/provider/package/up2date.rb
puppet-2.7.21 lib/puppet/provider/package/up2date.rb
puppet-parse-0.0.5 lib/vendor/puppet/provider/package/up2date.rb
puppet-parse-0.0.4 lib/vendor/puppet/provider/package/up2date.rb
puppet-parse-0.0.2 lib/vendor/puppet/provider/package/up2date.rb
puppet-2.7.20 lib/puppet/provider/package/up2date.rb
puppet-2.7.20.rc1 lib/puppet/provider/package/up2date.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/provider/package/up2date.rb
puppet-2.7.19 lib/puppet/provider/package/up2date.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/package/up2date.rb