:py:mod:`path_actions` ====================== .. py:module:: conda.core.path_actions .. autoapi-nested-parse:: Atomic actions that make up a package installation or removal transaction. Classes ------- .. autoapisummary:: conda.core.path_actions.Action conda.core.path_actions.PathAction conda.core.path_actions.MultiPathAction conda.core.path_actions.PrefixPathAction conda.core.path_actions.CreateInPrefixPathAction conda.core.path_actions.LinkPathAction conda.core.path_actions.PrefixReplaceLinkAction conda.core.path_actions.MakeMenuAction conda.core.path_actions.CompileMultiPycAction conda.core.path_actions.AggregateCompileMultiPycAction conda.core.path_actions.CreatePythonEntryPointAction conda.core.path_actions.CreatePrefixRecordAction conda.core.path_actions.UpdateHistoryAction conda.core.path_actions.RegisterEnvironmentLocationAction conda.core.path_actions.RemoveFromPrefixPathAction conda.core.path_actions.UnlinkPathAction conda.core.path_actions.RemoveMenuAction conda.core.path_actions.RemoveLinkedPackageRecordAction conda.core.path_actions.UnregisterEnvironmentLocationAction conda.core.path_actions.CacheUrlAction conda.core.path_actions.ExtractPackageAction Attributes ---------- .. autoapisummary:: conda.core.path_actions.FileNotFoundError conda.core.path_actions._MENU_RE conda.core.path_actions.REPR_IGNORE_KWARGS .. py:data:: FileNotFoundError .. py:data:: _MENU_RE .. py:data:: REPR_IGNORE_KWARGS :value: ('transaction_context', 'package_info', 'hold_path') .. py:class:: Action(transaction_context: dict[str, str] | None = None, target_prefix: str | None = None, unlink_precs: collections.abc.Iterable[conda.models.records.PackageRecord] | None = None, link_precs: collections.abc.Iterable[conda.models.records.PackageRecord] | None = None, remove_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None, update_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None, neutered_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None) Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: verified .. py:attribute:: _verified :value: False .. py:method:: verify() -> Exception | None :abstractmethod: Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: execute() -> None :abstractmethod: Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() -> None :abstractmethod: Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:method:: cleanup() -> None :abstractmethod: Carry out any post-execution tasks. .. py:method:: __repr__() Return repr(self). .. py:class:: PathAction(transaction_context: dict[str, str] | None = None, target_prefix: str | None = None, unlink_precs: collections.abc.Iterable[conda.models.records.PackageRecord] | None = None, link_precs: collections.abc.Iterable[conda.models.records.PackageRecord] | None = None, remove_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None, update_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None, neutered_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None) Bases: :py:obj:`Action` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: target_full_path :abstractmethod: .. py:class:: MultiPathAction(transaction_context: dict[str, str] | None = None, target_prefix: str | None = None, unlink_precs: collections.abc.Iterable[conda.models.records.PackageRecord] | None = None, link_precs: collections.abc.Iterable[conda.models.records.PackageRecord] | None = None, remove_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None, update_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None, neutered_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec] | None = None) Bases: :py:obj:`Action` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: target_full_paths :abstractmethod: .. py:class:: PrefixPathAction(transaction_context, target_prefix, target_short_path) Bases: :py:obj:`PathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: target_short_paths .. py:property:: target_full_path .. py:class:: CreateInPrefixPathAction(transaction_context, package_info, source_prefix, source_short_path, target_prefix, target_short_path) Bases: :py:obj:`PrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: source_full_path .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:class:: LinkPathAction(transaction_context, package_info, extracted_package_dir, source_short_path, target_prefix, target_short_path, link_type, source_path_data) Bases: :py:obj:`CreateInPrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: create_file_link_actions(transaction_context, package_info, target_prefix, requested_link_type) :classmethod: .. py:method:: create_directory_actions(transaction_context, package_info, target_prefix, requested_link_type, file_link_actions) :classmethod: .. py:method:: create_python_entry_point_windows_exe_action(transaction_context, package_info, target_prefix, requested_link_type, entry_point_def) :classmethod: .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:class:: PrefixReplaceLinkAction(transaction_context, package_info, extracted_package_dir, source_short_path, target_prefix, target_short_path, link_type, prefix_placeholder, file_mode, source_path_data) Bases: :py:obj:`LinkPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:class:: MakeMenuAction(transaction_context, package_info, target_prefix, target_short_path) Bases: :py:obj:`CreateInPrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: create_actions(transaction_context, package_info, target_prefix, requested_link_type) :classmethod: .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:class:: CompileMultiPycAction(transaction_context, package_info, target_prefix, source_short_paths, target_short_paths) Bases: :py:obj:`MultiPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: target_full_paths .. py:property:: source_full_paths .. py:method:: create_actions(transaction_context, package_info, target_prefix, requested_link_type, file_link_actions) :classmethod: .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:class:: AggregateCompileMultiPycAction(*individuals, **kw) Bases: :py:obj:`CompileMultiPycAction` Bunch up all of our compile actions, so that they all get carried out at once. This avoids clobbering and is faster when we have several individual packages requiring compilation. .. py:class:: CreatePythonEntryPointAction(transaction_context, package_info, target_prefix, target_short_path, module, func) Bases: :py:obj:`CreateInPrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: create_actions(transaction_context, package_info, target_prefix, requested_link_type) :classmethod: .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:class:: CreatePrefixRecordAction(transaction_context, package_info, target_prefix, target_short_path, requested_link_type, requested_spec, all_link_path_actions) Bases: :py:obj:`CreateInPrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: create_actions(transaction_context, package_info, target_prefix, requested_link_type, requested_spec, all_link_path_actions) :classmethod: .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:class:: UpdateHistoryAction(transaction_context, target_prefix, target_short_path, remove_specs, update_specs, neutered_specs) Bases: :py:obj:`CreateInPrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: create_actions(transaction_context, target_prefix, remove_specs, update_specs, neutered_specs) :classmethod: .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:class:: RegisterEnvironmentLocationAction(transaction_context, target_prefix) Bases: :py:obj:`PathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: target_full_path :abstractmethod: .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:class:: RemoveFromPrefixPathAction(transaction_context, linked_package_data, target_prefix, target_short_path) Bases: :py:obj:`PrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:class:: UnlinkPathAction(transaction_context, linked_package_data, target_prefix, target_short_path, link_type=LinkType.hardlink) Bases: :py:obj:`RemoveFromPrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:class:: RemoveMenuAction(transaction_context, linked_package_data, target_prefix, target_short_path) Bases: :py:obj:`RemoveFromPrefixPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: create_actions(transaction_context, linked_package_data, target_prefix) :classmethod: .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:class:: RemoveLinkedPackageRecordAction(transaction_context, linked_package_data, target_prefix, target_short_path) Bases: :py:obj:`UnlinkPathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:class:: UnregisterEnvironmentLocationAction(transaction_context, target_prefix) Bases: :py:obj:`PathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: target_full_path :abstractmethod: .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: execute() Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:class:: CacheUrlAction(url, target_pkgs_dir, target_package_basename, sha256=None, size=None, md5=None) Bases: :py:obj:`PathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: target_full_path .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: execute(progress_update_callback=None) Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: _execute_local(source_path, target_package_cache, progress_update_callback=None) .. py:method:: _execute_channel(target_package_cache, progress_update_callback=None) .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:method:: __str__() Return str(self). .. py:class:: ExtractPackageAction(source_full_path, target_pkgs_dir, target_extracted_dirname, record_or_spec, sha256, size, md5) Bases: :py:obj:`PathAction` Base class for path manipulation actions, including linking, unlinking, and others. Pre and post-transaction plugins should inherit this class to implement their own verification, execution, reversing, and cleanup steps. These methods are guaranteed to be called in the following order: 1. ``verify`` 2. ``execute`` 3. ``reverse`` (only if ``execute`` raises an exception) 4. ``cleanup`` :param transaction_context: Mapping between target prefixes and PrefixActions instances :param target_prefix: Target prefix for the action :param unlink_precs: Package records to be unlinked :param link_precs: Package records to link :param remove_specs: Specs to be removed :param update_specs: Specs to be updated :param neutered_specs: Specs to be neutered .. py:property:: target_full_path .. py:method:: verify() Carry out any pre-execution verification. Should set self._verified = True upon success. :return: On failure, this function should return (not raise!) an exception object. At the end of the verification run, all errors will be raised as a CondaMultiError. .. py:method:: execute(progress_update_callback=None) Execute the action. Called after ``self.verify()``. If this function raises an exception, ``self.reverse()`` will be called. .. py:method:: reverse() Reverse what was done in execute. Called only if ``self.execute()`` raises an exception. .. py:method:: cleanup() Carry out any post-execution tasks. .. py:method:: __str__() Return str(self).