methods/ai_packages.rb
# Check a package is in the repository
Check a package is in the repository
Check a package is in the repository
def check_ai_pkg_repo(options,p_struct,pkg_name,pkg_repo_dir)
  pkg_version=p_struct[pkg_name].version
  message = "Information:\tChecking if repository contains "+pkg_name+" "+pkg_version
  command = "pkg info -g #{pkg_repo_dir} -r #{pkg_name} |grep Version |awk \"{print \\\$2}\""
  output  = execute_command(options,message,command)
  repo_pkg_version = output.chomp
  return repo_pkg_version
end
def check_ai_pkg_repo ( options , p_struct , pkg_name , pkg_repo_dir ) pkg_version = p_struct [ pkg_name ] . version message = "Information:\tChecking if repository contains " + pkg_name + " " + pkg_version command = "pkg info -g #{pkg_repo_dir} -r #{pkg_name} |grep Version |awk \"{print \\\$2}\"" output = execute_command ( options , message , command ) repo_pkg_version = output . chomp return repo_pkg_version end
Check a package is in the repository
Check a package is in the repository
options
<not_specific>
p_struct
<not_specific>
pkg_name
<not_specific>
pkg_repo_dir
<not_specific>