libalpm
Arch Linux Package Manager Library
|
Functions to manipulate libalpm transactions. More...
Functions to manipulate libalpm transactions.
typedef enum _alpm_transflag_t alpm_transflag_t |
Transaction flags.
enum _alpm_transflag_t |
Transaction flags.
int alpm_trans_commit | ( | alpm_handle_t * | handle, |
alpm_list_t ** | data | ||
) |
Commit a transaction.
handle | the context handle |
data | the address of an alpm_list where detailed description of an error can be dumped (ie. list of conflicting files) |
Definition at line 143 of file trans.c.
References _alpm_remove_packages(), _alpm_sync_commit(), __alpm_trans_t::add, ALPM_ERR_TRANS_NOT_LOCKED, ALPM_ERR_TRANS_NOT_PREPARED, ALPM_ERR_TRANS_NULL, ALPM_TRANS_FLAG_NOLOCK, ASSERT, CHECK_HANDLE, __alpm_trans_t::flags, __alpm_trans_t::remove, RET_ERR, __alpm_trans_t::state, STATE_COMMITED, STATE_COMMITING, STATE_PREPARED, and __alpm_handle_t::trans.
Referenced by pacman_remove(), and sync_prepare_execute().
alpm_list_t* alpm_trans_get_add | ( | alpm_handle_t * | handle | ) |
Returns a list of packages added by the transaction.
handle | the context handle |
Definition at line 372 of file trans.c.
References __alpm_trans_t::add, ALPM_ERR_TRANS_NULL, ASSERT, CHECK_HANDLE, RET_ERR, and __alpm_handle_t::trans.
Referenced by display_targets(), and sync_prepare_execute().
alpm_transflag_t alpm_trans_get_flags | ( | alpm_handle_t * | handle | ) |
Returns the bitfield of flags for the current transaction.
handle | the context handle |
Definition at line 363 of file trans.c.
References ALPM_ERR_TRANS_NULL, ASSERT, CHECK_HANDLE, __alpm_trans_t::flags, RET_ERR, and __alpm_handle_t::trans.
alpm_list_t* alpm_trans_get_remove | ( | alpm_handle_t * | handle | ) |
Returns the list of packages removed by the transaction.
handle | the context handle |
Definition at line 381 of file trans.c.
References ALPM_ERR_TRANS_NULL, ASSERT, CHECK_HANDLE, __alpm_trans_t::remove, RET_ERR, and __alpm_handle_t::trans.
Referenced by display_targets(), and pacman_remove().
int alpm_trans_init | ( | alpm_handle_t * | handle, |
alpm_transflag_t | flags | ||
) |
Initialize the transaction.
handle | the context handle |
flags | flags of the transaction (like nodeps, etc) |
Definition at line 49 of file trans.c.
References _alpm_handle_lock(), ALPM_ERR_HANDLE_LOCK, ALPM_ERR_MEMORY, ALPM_ERR_TRANS_NOT_NULL, ALPM_TRANS_FLAG_NOLOCK, ASSERT, CALLOC, CHECK_HANDLE, __alpm_trans_t::flags, RET_ERR, __alpm_trans_t::state, STATE_INITIALIZED, and __alpm_handle_t::trans.
Referenced by trans_init().
int alpm_trans_interrupt | ( | alpm_handle_t * | handle | ) |
Interrupt a transaction.
handle | the context handle |
Definition at line 182 of file trans.c.
References ALPM_ERR_TRANS_NULL, ALPM_ERR_TRANS_TYPE, ASSERT, CHECK_HANDLE, RET_ERR, __alpm_trans_t::state, STATE_COMMITING, STATE_INTERRUPTED, and __alpm_handle_t::trans.
int alpm_trans_prepare | ( | alpm_handle_t * | handle, |
alpm_list_t ** | data | ||
) |
Prepare a transaction.
handle | the context handle |
data | the address of an alpm_list where a list of alpm_depmissing_t objects is dumped (conflicting packages) |
Definition at line 99 of file trans.c.
References _alpm_remove_prepare(), _alpm_sync_prepare(), __alpm_trans_t::add, ALPM_ERR_PKG_INVALID_ARCH, ALPM_ERR_TRANS_NOT_INITIALIZED, ALPM_ERR_TRANS_NULL, ALPM_ERR_WRONG_ARGS, ASSERT, CHECK_HANDLE, __alpm_trans_t::remove, RET_ERR, __alpm_trans_t::state, STATE_INITIALIZED, STATE_PREPARED, and __alpm_handle_t::trans.
Referenced by pacman_remove(), and sync_prepare_execute().
int alpm_trans_release | ( | alpm_handle_t * | handle | ) |
Release a transaction.
handle | the context handle |
Definition at line 200 of file trans.c.
References _, _alpm_handle_unlock(), _alpm_log(), _alpm_trans_free(), ALPM_ERR_TRANS_NULL, ALPM_LOG_WARNING, alpm_logaction(), ALPM_TRANS_FLAG_NOLOCK, ASSERT, CHECK_HANDLE, __alpm_trans_t::flags, __alpm_handle_t::lockfile, RET_ERR, __alpm_trans_t::state, STATE_IDLE, and __alpm_handle_t::trans.
Referenced by trans_release().