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)#

Bases: abc.ABC

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

_verified = False#
transaction_context = None#
target_prefix = None#
remove_specs = None#
update_specs = None#
neutered_specs = None#
abstractmethod 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.

abstractmethod execute() None#

Execute the action.

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

abstractmethod reverse() None#

Reverse what was done in execute.

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

abstractmethod cleanup() None#

Carry out any post-execution tasks.

property verified#
__repr__()#
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 PrefixActionGroup 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 PrefixActionGroup 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 PrefixActionGroup 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

transaction_context#
target_prefix#
target_short_path#
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 PrefixActionGroup 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

package_info#
source_prefix#
source_short_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.

property source_full_path#
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 PrefixActionGroup 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)#
_execute_successful = False#
source_path_data#
prefix_path_data = None#
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 PrefixActionGroup 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

prefix_placeholder#
file_mode#
intermediate_path = None#
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 PrefixActionGroup 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_successful = False#
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 PrefixActionGroup 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, file_link_actions)#
transaction_context#
package_info#
target_prefix#
source_short_paths#
target_short_paths#
prefix_path_data = None#
prefix_paths_data#
_execute_successful = False#
property target_full_paths#
property source_full_paths#
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.

_individuals = ()#
execute()#

Execute the action.

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

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 PrefixActionGroup 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)#
module#
func#
prefix_path_data#
_execute_successful = False#
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: conda.models.match_spec.MatchSpec | list[conda.models.match_spec.MatchSpec], 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 PrefixActionGroup 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: conda.models.match_spec.MatchSpec | list[conda.models.match_spec.MatchSpec], all_link_path_actions)#
requested_spec#
_execute_successful = False#
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 PrefixActionGroup 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)#
remove_specs#
update_specs#
neutered_specs#
hold_path#
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 PrefixActionGroup 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

transaction_context#
target_prefix#
_execute_successful = False#
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.

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

linked_package_data#
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 PrefixActionGroup 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

holding_short_path#
holding_full_path#
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 PrefixActionGroup 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 PrefixActionGroup 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 PrefixActionGroup 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

transaction_context#
target_prefix#
_execute_successful = False#
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.

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

url#
target_pkgs_dir#
target_package_basename#
sha256 = None#
size = None#
md5 = None#
hold_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.

property target_full_path#
__str__()#
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 PrefixActionGroup 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

source_full_path#
target_pkgs_dir#
target_extracted_dirname#
hold_path#
record_or_spec#
sha256#
size#
md5#
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.

property target_full_path#
__str__()#