def tar_packages(pkgmgr, pkg_type, pkg_names, src_dir, temp_dir):
 tarballs = []
 include_string = ' .'
 exclude_string = None
 names = [p.strip() for p in pkg_names.split(',')]
 for name in names:
  print ('Processing %s ... ' % name)
  if (pkg_type == 'client'):
   pkg_dir = src_dir
   exclude_string = get_exclude_string(pkg_dir)
  elif (pkg_type == 'test'):
   pkg_dir = os.path.join(get_test_dir(name, src_dir), name)
  else:
   pkg_dir = os.path.join(src_dir, name)
  pkg_name = pkgmgr.get_tarball_name(name, pkg_type)
  tarball_path = pkgmgr.tar_package(pkg_name=pkg_name, src_dir=pkg_dir, dest_dir=temp_dir, include_string=include_string, exclude_string=exclude_string)
  tarballs.append(tarball_path)
 return tarballs

def tar_packages ( pkgmgr , pkg_type , pkg_names , src_dir , temp_dir ) : tarballs = [ ] include_string = ' .' exclude_string = None names = [ p . strip ( ) for p in pkg_names . split ( ',' ) ] for name in names : print ( 'Processing %s ... ' % name ) if ( pkg_type == 'client' ) : pkg_dir = src_dir exclude_string = get_exclude_string ( pkg_dir ) elif ( pkg_type == 'test' ) : pkg_dir = os . path . join ( get_test_dir ( name , src_dir ) , name ) else : pkg_dir = os . path . join ( src_dir , name ) pkg_name = pkgmgr . get_tarball_name ( name , pkg_type ) tarball_path = pkgmgr . tar_package ( pkg_name = pkg_name , src_dir = pkg_dir , dest_dir = temp_dir , include_string = include_string , exclude_string = exclude_string ) tarballs . append ( tarball_path ) return tarballs
tar all packages up and return a list of each tar created .