def satisfyVersionFromSearchPaths(name, version_required, search_paths, update=False, type='<STR_LIT>', inherit_shrinkwrap=None):
<EOL>from yotta.lib import pack<EOL>v = None<EOL>try:<EOL><INDENT>sv = sourceparse.parseSourceURL(version_required)<EOL><DEDENT>except ValueError as e:<EOL><INDENT>logging.error(e)<EOL>return None<EOL><DEDENT>try:<EOL><INDENT>local_version = searchPathsFor(<EOL>name,<EOL>sv.semanticSpec(),<EOL>search_paths,<EOL>type,<EOL>inherit_shrinkwrap = inherit_shrinkwrap<EOL>)<EOL><DEDENT>except pack.InvalidDescription as e:<EOL><INDENT>logger.error(e)<EOL>return None<EOL><DEDENT>logger.debug("<STR_LIT>" % (('<STR_LIT>', '<STR_LIT>')[not local_version], name))<EOL>if local_version:<EOL><INDENT>if update and not local_version.installedLinked():<EOL><INDENT>v = latestSuitableVersion(name, version_required, registry=_registryNamespaceForType(type))<EOL>if local_version:<EOL><INDENT>local_version.setLatestAvailable(v)<EOL><DEDENT><DEDENT>if local_version.installedLinked() or not local_version.outdated():<EOL><INDENT>logger.debug("<STR_LIT>" % local_version.path)<EOL>if name != local_version.getName():<EOL><INDENT>raise Exception('<STR_LIT>' % (<EOL>local_version.getName(), name, local_version.path<EOL>))<EOL><DEDENT>return local_version<EOL><DEDENT>logger.info('<STR_LIT>' % (<EOL>name,<EOL>local_version.getVersion(),<EOL>v<EOL>))<EOL>fsutils.rmRf(local_version.path)<EOL>return _satisfyVersionByInstallingVersion(<EOL>name, version_required, local_version.path, v, type=type, inherit_shrinkwrap=inherit_shrinkwrap<EOL>)<EOL><DEDENT>return None<EOL>
returns a Component/Target for the specified version, if found in the
        list of search paths. If `update' is True, then also check for newer
        versions of the found component, and update it in-place (unless it was
        installed via a symlink).