def _update_rospack_cache(env=None):
 if (env is None):
  env = os.environ
 cache = _pkg_dir_cache
 if cache:
  return True
 ros_root = env[ROS_ROOT]
 ros_package_path = env.get(ROS_PACKAGE_PATH, '')
 return _read_rospack_cache(cache, ros_root, ros_package_path)

def _update_rospack_cache ( env = None ) : if ( env is None ) : env = os . environ cache = _pkg_dir_cache if cache : return True ros_root = env [ ROS_ROOT ] ros_package_path = env . get ( ROS_PACKAGE_PATH , '' ) return _read_rospack_cache ( cache , ros_root , ros_package_path )
internal routine to update global package directory cache @return: true if cache is valid @rtype: bool .