def _populate_cache(platform, pkg_cache, mount_dir):
 if (not pkg_cache):
  return
 if (not os.path.isdir(pkg_cache)):
  return
 if (platform == 'pacman'):
  cache_dir = '{0}/var/cache/pacman/pkg'.format(mount_dir)
 __salt__['file.mkdir'](cache_dir, 'root', 'root', '755')
 __salt__['file.copy'](pkg_cache, cache_dir, recurse=True, remove_existing=True)

def _populate_cache ( platform , pkg_cache , mount_dir ) : if ( not pkg_cache ) : return if ( not os . path . isdir ( pkg_cache ) ) : return if ( platform == 'pacman' ) : cache_dir = '{0}/var/cache/pacman/pkg' . format ( mount_dir ) __salt__ [ 'file.mkdir' ] ( cache_dir , 'root' , 'root' , '755' ) __salt__ [ 'file.copy' ] ( pkg_cache , cache_dir , recurse = True , remove_existing = True )
if a pkg_cache directory is specified .