Sha256: 9e2c11012fc3c43a4cd3351e3c20f76ec537c9139074829472d42423f0f70526
Contents?: true
Size: 1.5 KB
Versions: 10
Compression:
Stored size: 1.5 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) execute("hdiutil attach #{name}.dmg") execute("installer -pkg /Volumes/#{name}/#{name}.pkg -target /") end def uninstall_package(name, cmdline_args = '') raise "Package #{name} cannot be uninstalled 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
10 entries across 10 versions & 1 rubygems