Module: FreeBSD::Pkg

Includes:
Beaker::CommandFactory
Included in:
Host
Defined in:
lib/beaker/host/freebsd/pkg.rb

Instance Attribute Summary

Attributes included from Beaker::CommandFactory

#assertions

Instance Method Summary collapse

Methods included from Beaker::CommandFactory

#execute, #fail_test

Instance Method Details

#check_for_package(name, opts = {}) ⇒ Object



9
10
11
# File 'lib/beaker/host/freebsd/pkg.rb', line 9

def check_for_package(name, opts = {})
  execute("pkg info #{name}", opts) { |result| result }
end

#install_package(name, cmdline_args = nil, opts = {}) ⇒ Object



4
5
6
7
# File 'lib/beaker/host/freebsd/pkg.rb', line 4

def install_package(name, cmdline_args = nil, opts = {})
  cmdline_args ||= '-y'
  execute("pkg install #{cmdline_args} #{name}", opts) { |result| result }
end