Sha256: ab303ac51df3a820b766fdde198b12ad1c752f677d6f4dd9b1d067d5ff01a13b

Contents?: true

Size: 449 Bytes

Versions: 9

Compression:

Stored size: 449 Bytes

Contents

class Specinfra::Command::Smartos::Base::Package < Specinfra::Command::Solaris::Base::Package
  def check_is_installed(package, version=nil)
    cmd = "/opt/local/bin/pkgin list 2> /dev/null | grep -qw ^#{escape(package)}"
    if version
      cmd = "#{cmd}-#{escape(version)}"
    end
    cmd
  end

  def get_version(package, opts=nil)
    "pkgin list | cut -f 1 -d ' ' | grep -E '^#{escape(package)}-([^-])+$' | grep -Eo '(\\.|\\w)+$'"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta15 lib/specinfra/command/smartos/base/package.rb
specinfra-2.0.0.beta14 lib/specinfra/command/smartos/base/package.rb
specinfra-2.0.0.beta13 lib/specinfra/command/smartos/base/package.rb
specinfra-2.0.0.beta12 lib/specinfra/command/smartos/base/package.rb
specinfra-2.0.0.beta11 lib/specinfra/command/smartos/base/package.rb
specinfra-2.0.0.beta10 lib/specinfra/command/smartos/base/package.rb
specinfra-2.0.0.beta9 lib/specinfra/command/smartos/base/package.rb
specinfra-2.0.0.beta8 lib/specinfra/command/smartos/base/package.rb
specinfra-2.0.0.beta7 lib/specinfra/command/smartos/base/package.rb