pkgcore.operations package¶
Submodules¶
- pkgcore.operations.domain module
Failure
base
install
replace
replace.create_engine()
replace.create_op()
replace.create_repo_op()
replace.engine_kls()
replace.finalize_repo()
replace.finish()
replace.format_replace_op_name
replace.postinst()
replace.postrm()
replace.preinst()
replace.prerm()
replace.remove()
replace.repo_add()
replace.repo_remove()
replace.stage_depends
replace.stage_hooks
replace.start()
replace.transfer()
uninstall
uninstall.create_engine()
uninstall.create_op()
uninstall.create_repo_op()
uninstall.engine_kls()
uninstall.finalize_repo()
uninstall.finish()
uninstall.format_uninstall_op_name
uninstall.postrm()
uninstall.prerm()
uninstall.remove()
uninstall.repo_remove()
uninstall.stage_depends
uninstall.stage_hooks
uninstall.start()
- pkgcore.operations.format module
- pkgcore.operations.observer module
- pkgcore.operations.regen module
- pkgcore.operations.repo module
Module contents¶
operation templates for package/repository/data source objects
For new format implementations, new formats, and generally any new extension, an operation class will likely have to be defined. While the implementations are a bit repetitive, the design of it is intentional to ensure that any derivative will be forced to adhere to the pkgcore internal api.
Basically it’s a crappy form of zope interfaces; converting to zope.interfaces may occur down the line if dependencies can be kept as minimal as possible.
- exception pkgcore.operations.OperationError(api, exc=None)[source]¶
Bases:
PkgcoreException
- class pkgcore.operations.base(disable_overrides=(), enable_overrides=())[source]¶
Bases:
object
- UNSUPPORTED = <object object>¶
- enabled_operations¶
- raw_operations¶
- run_if_supported(operation_name, *args, **kwds)[source]¶
invoke an operation if it’s supported
- Parameters:
operation_name – operation to run if supported
args – positional args passed to the operation
kwds – optional args passed to the operation
or_return – if the operation isn’t supported, return this (if unspecified, it returns
base.UNSUPPORTED
)
- Returns:
Either the value of or_return, or if the operation is supported, the return value from that operation