def resolve(self, requirement_set):<EOL>
<EOL>if self.preparer.wheel_download_dir:<EOL><INDENT>ensure_dir(self.preparer.wheel_download_dir)<EOL><DEDENT>root_reqs = (<EOL>requirement_set.unnamed_requirements +<EOL>list(requirement_set.requirements.values())<EOL>)<EOL>self.require_hashes = (<EOL>requirement_set.require_hashes or<EOL>any(req.has_hash_options for req in root_reqs)<EOL>)<EOL>locations = self.finder.get_formatted_locations()<EOL>if locations:<EOL><INDENT>logger.info(locations)<EOL><DEDENT>discovered_reqs = []  <EOL>hash_errors = HashErrors()<EOL>for req in chain(root_reqs, discovered_reqs):<EOL><INDENT>try:<EOL><INDENT>discovered_reqs.extend(<EOL>self._resolve_one(requirement_set, req)<EOL>)<EOL><DEDENT>except HashError as exc:<EOL><INDENT>exc.req = req<EOL>hash_errors.append(exc)<EOL><DEDENT><DEDENT>if hash_errors:<EOL><INDENT>raise hash_errors<EOL><DEDENT>
Resolve what operations need to be done

        As a side-effect of this method, the packages (and their dependencies)
        are downloaded, unpacked and prepared for installation. This
        preparation is done by ``pip.operations.prepare``.

        Once PyPI has static dependency metadata available, it would be
        possible to move the preparation to become a step separated from
        dependency resolution.