Sha256: df69ad8a3935c55a4eb562b32ed5505695fbbba1bb53af62e1d437b1dc2b92ec

Contents?: true

Size: 1 KB

Versions: 271

Compression:

Stored size: 1 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 :osfamily => :redhat, :lsbdistrelease => ["2.1", "3", "4"]

  confine    :osfamily => :redhat

  # 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

271 entries across 271 versions & 3 rubygems

Version Path
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/provider/package/up2date.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/provider/package/up2date.rb
puppet-4.10.12 lib/puppet/provider/package/up2date.rb
puppet-4.10.12-x86-mingw32 lib/puppet/provider/package/up2date.rb
puppet-4.10.12-x64-mingw32 lib/puppet/provider/package/up2date.rb
puppet-4.10.12-universal-darwin lib/puppet/provider/package/up2date.rb
puppet-4.10.11 lib/puppet/provider/package/up2date.rb
puppet-4.10.11-x86-mingw32 lib/puppet/provider/package/up2date.rb
puppet-4.10.11-x64-mingw32 lib/puppet/provider/package/up2date.rb
puppet-4.10.11-universal-darwin lib/puppet/provider/package/up2date.rb
puppet-4.10.10 lib/puppet/provider/package/up2date.rb
puppet-4.10.10-x86-mingw32 lib/puppet/provider/package/up2date.rb
puppet-4.10.10-x64-mingw32 lib/puppet/provider/package/up2date.rb
puppet-4.10.10-universal-darwin lib/puppet/provider/package/up2date.rb
puppet-retrospec-1.6.1 vendor/pup410/lib/puppet/provider/package/up2date.rb
puppet-retrospec-1.6.0 vendor/pup410/lib/puppet/provider/package/up2date.rb
puppet-4.10.9 lib/puppet/provider/package/up2date.rb
puppet-4.10.9-x86-mingw32 lib/puppet/provider/package/up2date.rb
puppet-4.10.9-x64-mingw32 lib/puppet/provider/package/up2date.rb
puppet-4.10.9-universal-darwin lib/puppet/provider/package/up2date.rb