puppetlabs/puppet · error · Puppet::Error

The pkg-get command is missing; blastwave packaging unavaila

Error message

The pkg-get command is missing; blastwave packaging unavailable

What it means

The blastwave provider's self.extended hook (blastwave.rb:19) raises Puppet::Error when command(:pkgget) still equals the unresolved default 'pkg-get', i.e. /opt/csw/bin/pkg-get was not found executable when the provider was loaded. Blastwave package management is therefore declared unavailable: the provider refuses to operate instead of shelling out to a missing binary.

Source

Thrown at lib/puppet/provider/package/blastwave.rb:19

# frozen_string_literal: true

# Packaging using Blastwave's pkg-get program.
Puppet::Type.type(:package).provide :blastwave, :parent => :sun, :source => :sun do
  desc "Package management using Blastwave.org's `pkg-get` command on Solaris."
  pkgget = "pkg-get"
  pkgget = "/opt/csw/bin/pkg-get" if FileTest.executable?("/opt/csw/bin/pkg-get")

  confine 'os.family' => :solaris

  commands :pkgget => pkgget

  def pkgget_with_cat(*args)
    Puppet::Util.withenv(:PAGER => "/usr/bin/cat") { pkgget(*args) }
  end

  def self.extended(mod)
    unless command(:pkgget) != "pkg-get"
      raise Puppet::Error,
            _("The pkg-get command is missing; blastwave packaging unavailable")
    end

    unless Puppet::FileSystem.exist?("/var/pkg-get/admin")
      Puppet.notice _("It is highly recommended you create '/var/pkg-get/admin'.")
      Puppet.notice _("See /var/pkg-get/admin-fullauto")
    end
  end

  def self.instances(hash = {})
    blastlist(hash).collect do |bhash|
      bhash.delete(:avail)
      new(bhash)
    end
  end

  # Turn our blastwave listing into a bunch of hashes.
  def self.blastlist(hash)

View on GitHub (pinned to e227c27540)

Solutions

  1. Install pkg-get from OpenCSW (`pkgadd -d http://get.opencsw.org/now CSWpkgget`) so /opt/csw/bin/pkg-get exists and is executable.
  2. Better: migrate the resources off blastwave — use the pkgutil (OpenCSW pkgutil) or Sun provider, since Blastwave is unmaintained.
  3. If the provider should never run on these nodes, add confine/`provider =>` selection so blastwave is not chosen.

Example fix

# before
package { 'cswtop': ensure => installed, provider => 'blastwave' }

# after
package { 'cswtop': ensure => installed, provider => 'pkgutil' }
Defensive patterns

Strategy: validation

Validate before calling

# gate the provider on the tool being present
FileTest.executable?('/opt/csw/bin/pkg-get') or raise 'blastwave pkg-get missing; install CSWpkgget or use pkgutil'

Try / catch

begin
  Puppet::Type.type(:package).provider(:blastwave)
rescue Puppet::Error => e
  raise unless e.message.include?('pkg-get')
  # provider unusable; fall back to pkgutil for these resources
  resources.each { |r| r[:provider] = :pkgutil }
end

Prevention

When it happens

Trigger: A package resource with provider => blastwave (or a solaris node where this provider is selected) on a machine without the OpenCSW pkg-get tool installed at /opt/csw/bin/pkg-get; also when the file exists but is not executable.

Common situations: New Solaris zones/minimal installs without OpenCSW; migrations off Blastwave (which is long dead) where leftover manifests still reference the provider; permissions/automount problems hiding /opt/csw.

Related errors


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/84e7ae9991f56ce3. Report an issue: GitHub.