package_cache_data
Tools for managing the package cache (previously downloaded packages).
Classes
This metaclass does basic caching of PackageCache instance objects. |
|
Functions
|
This function gets called from ProgressiveFetchExtract.execute. |
|
This function gets called after do_cache_action completes. |
|
|
|
|
|
|
|
Checks to see if the requested package is in the cache; and if so, it removes both |
|
Attributes
- FileNotFoundError
- THREADSAFE_EXTRACT = False
- EXTRACT_THREADS
- class PackageCacheType
Bases:
type
This metaclass does basic caching of PackageCache instance objects.
- __call__(pkgs_dir)
Call self as a function.
- class PackageCacheData(pkgs_dir)
- property _package_cache_records
- property is_writable
- _cache_
- insert(package_cache_record)
- load()
- reload()
- get(package_ref, default=NULL)
- remove(package_ref, default=NULL)
- query(package_ref_or_match_spec)
- iter_records()
- classmethod query_all(package_ref_or_match_spec, pkgs_dirs=None)
- classmethod first_writable(pkgs_dirs=None)
- classmethod writable_caches(pkgs_dirs=None)
- classmethod read_only_caches(pkgs_dirs=None)
- classmethod all_caches_writable_first(pkgs_dirs=None)
- classmethod get_all_extracted_entries()
- classmethod get_entry_to_link(package_ref)
- classmethod tarball_file_in_cache(tarball_path, md5sum=None, exclude_caches=())
- classmethod clear()
- tarball_file_in_this_cache(tarball_path, md5sum=None)
- _check_writable()
- static _clean_tarball_path_and_get_md5sum(tarball_path, md5sum=None)
- _scan_for_dist_no_channel(dist_str)
- itervalues()
- values()
- __repr__()
Return repr(self).
- _make_single_record(package_filename)
- static _dedupe_pkgs_dir_contents(pkgs_dir_contents)
- class ProgressiveFetchExtract(link_prefs)
- property cache_actions
- property extract_actions
- static make_actions_for_record(pref_or_spec)
- prepare()
- execute()
Run each action in self.paired_actions. Each action in cache_actions runs before its corresponding extract_actions.
- static _progress_bar(prec_or_spec, position=None, leave=False) conda.common.io.ProgressBar
- __hash__()
Return hash(self).
- __eq__(other)
Return self==value.
- do_cache_action(prec, cache_action, progress_bar, download_total=1.0)
This function gets called from ProgressiveFetchExtract.execute.
- do_extract_action(prec, extract_action, progress_bar)
This function gets called after do_cache_action completes.
- do_cleanup(actions)
- do_reverse(actions)
- done_callback(future: concurrent.futures.Future, actions: tuple[CacheUrlAction | ExtractPackageAction, Ellipsis], progress_bar: conda.common.io.ProgressBar, exceptions: list[Exception], finish: bool = False)
- rm_fetched(dist)
Checks to see if the requested package is in the cache; and if so, it removes both the package itself and its extracted contents.
- download(url, dst_path, session=None, md5sum=None, urlstxt=False, retries=3)