path_actions#

Atomic actions that make up a package installation or removal transaction.

Classes#

Action

Base class for path manipulation actions, including linking, unlinking, and others.

PathAction

Base class for path manipulation actions, including linking, unlinking, and others.

MultiPathAction

Base class for path manipulation actions, including linking, unlinking, and others.

PrefixPathAction

Base class for path manipulation actions, including linking, unlinking, and others.

CreateInPrefixPathAction

Base class for path manipulation actions, including linking, unlinking, and others.

LinkPathAction

Base class for path manipulation actions, including linking, unlinking, and others.

PrefixReplaceLinkAction

Base class for path manipulation actions, including linking, unlinking, and others.

MakeMenuAction

Base class for path manipulation actions, including linking, unlinking, and others.

CompileMultiPycAction

Base class for path manipulation actions, including linking, unlinking, and others.

AggregateCompileMultiPycAction

Bunch up all of our compile actions, so that they all get carried out at once.

CreatePythonEntryPointAction

Base class for path manipulation actions, including linking, unlinking, and others.

CreatePrefixRecordAction

Base class for path manipulation actions, including linking, unlinking, and others.

UpdateHistoryAction

Base class for path manipulation actions, including linking, unlinking, and others.

RegisterEnvironmentLocationAction

Base class for path manipulation actions, including linking, unlinking, and others.

RemoveFromPrefixPathAction

Base class for path manipulation actions, including linking, unlinking, and others.

UnlinkPathAction

Base class for path manipulation actions, including linking, unlinking, and others.

RemoveMenuAction

Base class for path manipulation actions, including linking, unlinking, and others.

RemoveLinkedPackageRecordAction

Base class for path manipulation actions, including linking, unlinking, and others.

UnregisterEnvironmentLocationAction

Base class for path manipulation actions, including linking, unlinking, and others.

CacheUrlAction

Base class for path manipulation actions, including linking, unlinking, and others.

ExtractPackageAction

Base class for path manipulation actions, including linking, unlinking, and others.

Attributes#

FileNotFoundError#
_MENU_RE#
REPR_IGNORE_KWARGS = ('transaction_context', 'package_info', 'hold_path')#
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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

property verified#
_verified = False#
abstract verify() Exception | None#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

abstract execute() None#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

abstract reverse() None#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

abstract cleanup() None#

Carry out any post-execution tasks.

__repr__()#

Return repr(self).

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: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

abstract property target_full_path#
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: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

abstract property target_full_paths#
class PrefixPathAction(transaction_context, target_prefix, target_short_path)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

property target_short_paths#
property target_full_path#
class CreateInPrefixPathAction(transaction_context, package_info, source_prefix, source_short_path, target_prefix, target_short_path)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

property source_full_path#
verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

cleanup()#

Carry out any post-execution tasks.

class LinkPathAction(transaction_context, package_info, extracted_package_dir, source_short_path, target_prefix, target_short_path, link_type, source_path_data)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

classmethod create_directory_actions(transaction_context, package_info, target_prefix, requested_link_type, file_link_actions)#
classmethod create_python_entry_point_windows_exe_action(transaction_context, package_info, target_prefix, requested_link_type, entry_point_def)#
verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

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: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

class MakeMenuAction(transaction_context, package_info, target_prefix, target_short_path)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

classmethod create_actions(transaction_context, package_info, target_prefix, requested_link_type)#
execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

class CompileMultiPycAction(transaction_context, package_info, target_prefix, source_short_paths, target_short_paths)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

property target_full_paths#
property source_full_paths#
classmethod create_actions(transaction_context, package_info, target_prefix, requested_link_type, file_link_actions)#
verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

cleanup()#

Carry out any post-execution tasks.

execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

class AggregateCompileMultiPycAction(*individuals, **kw)#

Bases: 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.

class CreatePythonEntryPointAction(transaction_context, package_info, target_prefix, target_short_path, module, func)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

classmethod create_actions(transaction_context, package_info, target_prefix, requested_link_type)#
execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

class CreatePrefixRecordAction(transaction_context, package_info, target_prefix, target_short_path, requested_link_type, requested_spec, all_link_path_actions)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

classmethod create_actions(transaction_context, package_info, target_prefix, requested_link_type, requested_spec, all_link_path_actions)#
execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

class UpdateHistoryAction(transaction_context, target_prefix, target_short_path, remove_specs, update_specs, neutered_specs)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

classmethod create_actions(transaction_context, target_prefix, remove_specs, update_specs, neutered_specs)#
execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

cleanup()#

Carry out any post-execution tasks.

class RegisterEnvironmentLocationAction(transaction_context, target_prefix)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

abstract property target_full_path#
verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

cleanup()#

Carry out any post-execution tasks.

class RemoveFromPrefixPathAction(transaction_context, linked_package_data, target_prefix, target_short_path)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

class UnlinkPathAction(transaction_context, linked_package_data, target_prefix, target_short_path, link_type=LinkType.hardlink)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

cleanup()#

Carry out any post-execution tasks.

class RemoveMenuAction(transaction_context, linked_package_data, target_prefix, target_short_path)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

classmethod create_actions(transaction_context, linked_package_data, target_prefix)#
execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

cleanup()#

Carry out any post-execution tasks.

class RemoveLinkedPackageRecordAction(transaction_context, linked_package_data, target_prefix, target_short_path)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

class UnregisterEnvironmentLocationAction(transaction_context, target_prefix)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

abstract property target_full_path#
verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

execute()#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

cleanup()#

Carry out any post-execution tasks.

class CacheUrlAction(url, target_pkgs_dir, target_package_basename, sha256=None, size=None, md5=None)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

property target_full_path#
verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

execute(progress_update_callback=None)#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

_execute_local(source_path, target_package_cache, progress_update_callback=None)#
_execute_channel(target_package_cache, progress_update_callback=None)#
reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

cleanup()#

Carry out any post-execution tasks.

__str__()#

Return str(self).

class ExtractPackageAction(source_full_path, target_pkgs_dir, target_extracted_dirname, record_or_spec, sha256, size, md5)#

Bases: 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

Parameters:
  • transaction_context -- Mapping between target prefixes and PrefixActions instances

  • target_prefix -- Target prefix for the action

  • unlink_precs -- Package records to be unlinked

  • link_precs -- Package records to link

  • remove_specs -- Specs to be removed

  • update_specs -- Specs to be updated

  • neutered_specs -- Specs to be neutered

property target_full_path#
verify()#

Carry out any pre-execution verification.

Should set self._verified = True upon success.

Returns:

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.

execute(progress_update_callback=None)#

Execute the action.

Called after self.verify(). If this function raises an exception, self.reverse() will be called.

reverse()#

Reverse what was done in execute.

Called only if self.execute() raises an exception.

cleanup()#

Carry out any post-execution tasks.

__str__()#

Return str(self).