def search_packages(self, reference, query=None, remote_name=None, outdated=False): recorder = SearchRecorder() search = Search(self._client_cache, self._remote_manager, self._registry) try: reference = ConanFileReference.loads(str(reference)) references = search.search_packages(reference, remote_name, query=query, outdated=outdated) except ConanException as exc: recorder.error = True exc.info = recorder.get_info() raise for remote_name, remote_ref in references.items(): recorder.add_recipe(remote_name, reference) if remote_ref.ordered_packages: for package_id, properties in remote_ref.ordered_packages.items(): package_recipe_hash = properties.get("recipe_hash", None) recorder.add_package(remote_name, reference, package_id, properties.get("options", []), properties.get("settings", []), properties.get("full_requires", []), remote_ref.recipe_hash != package_recipe_hash) return recorder.get_info()
def search_packages(self, reference, query=None, remote=None, outdated=False): search = Search(self._client_cache, self._remote_manager, self._registry) return search.search_packages(reference, remote, query=query, outdated=outdated)
def search_recipes(self, pattern, remote_name=None, case_sensitive=False): recorder = SearchRecorder() search = Search(self._client_cache, self._remote_manager, self._registry) try: references = search.search_recipes(pattern, remote_name, case_sensitive) except ConanException as exc: recorder.error = True exc.info = recorder.get_info() raise for remote_name, refs in references.items(): for ref in refs: recorder.add_recipe(remote_name, ref, with_packages=False) return recorder.get_info()
def search_recipes(self, pattern, remote=None, case_sensitive=False): search = Search(self._client_cache, self._remote_manager, self._user_io) return search.search_recipes(pattern, remote, case_sensitive)