Sha256: bc91dc7c4c6fa0b85969611fd9d6c2627dc320edaf154c83cdbcc7c2f19456a3

Contents?: true

Size: 1.45 KB

Versions: 3

Compression:

Stored size: 1.45 KB

Contents

module Mac::Pkg
  include Beaker::CommandFactory

  def check_for_package(name)
    raise "Package #{name} cannot be queried on #{self}"
  end

  def install_package(name, cmdline_args = '', version = nil)
    raise "Package #{name} cannot be installed on #{self}"
  end

  def uninstall_package(name, cmdline_args = '')
    raise "Package #{name} cannot be installed on #{self}"
  end

  # Upgrade an installed package to the latest available version
  #
  # @param [String] name          The name of the package to update
  # @param [String] cmdline_args  Additional command line arguments for
  #                               the package manager
  def upgrade_package(name, cmdline_args = '')
      raise "Package #{name} cannot be upgraded on #{self}"
  end

  # Deploy configuration generated by the packaging tooling to this host.
  #
  # This method calls one of #deploy_apt_repo, #deploy_yum_repo, or
  # #deploy_zyp_repo depending on the platform of this Host.
  #
  # @note See {Beaker::DSL::Helpers::HostHelpers#deploy_package_repo} for info on
  #       params
  def deploy_package_repo(path, name, version)
    raise "Package repo cannot be deployed on #{self}; the platform is not supported"
  end

  #Examine the host system to determine the architecture
  #@return [Boolean] true if x86_64, false otherwise
  def determine_if_x86_64
    result = exec(Beaker::Command.new("uname -a | grep x86_64"), :expect_all_exit_codes => true)
    result.exit_code == 0
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
beaker-2.13.0 lib/beaker/host/mac/pkg.rb
beaker-2.12.0 lib/beaker/host/mac/pkg.rb
beaker-2.11.0 lib/beaker/host/mac/pkg.rb