Transaction Functions

Functions to manipulate libalpm transactions. More...

Functions

int alpm_trans_init (pmtranstype_t type, pmtransflag_t flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv, alpm_trans_cb_progress progress)
int alpm_trans_sysupgrade ()
int alpm_trans_addtarget (char *target)
int alpm_trans_prepare (alpm_list_t **data)
int alpm_trans_commit (alpm_list_t **data)
int alpm_trans_interrupt ()
int alpm_trans_release ()

Detailed Description

Functions to manipulate libalpm transactions.


Function Documentation

int alpm_trans_addtarget ( char *  target  ) 

Add a target to the transaction.

Parameters:
target the name of the target to add
Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 111 of file trans.c.

References _alpm_trans_addtarget(), ALPM_LOG_FUNC, ASSERT, handle, PM_ERR_HANDLE_NULL, PM_ERR_TRANS_NOT_INITIALIZED, PM_ERR_TRANS_NULL, PM_ERR_WRONG_ARGS, RET_ERR, __pmtrans_t::state, STATE_INITIALIZED, and _pmhandle_t::trans.

Referenced by pacman_add(), and pacman_remove().

Here is the call graph for this function:

Here is the caller graph for this function:

int alpm_trans_commit ( alpm_list_t **  data  ) 

Commit a transaction.

Parameters:
data the address of an alpm_list where detailed description of an error can be dumped (ie. list of conflicting files)
Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 152 of file trans.c.

References _alpm_trans_commit(), ALPM_LOG_FUNC, ASSERT, handle, PM_ERR_HANDLE_NULL, PM_ERR_TRANS_NOT_PREPARED, PM_ERR_TRANS_NULL, RET_ERR, __pmtrans_t::state, STATE_PREPARED, and _pmhandle_t::trans.

Referenced by pacman_add(), and pacman_remove().

Here is the call graph for this function:

Here is the caller graph for this function:

int alpm_trans_init ( pmtranstype_t  type,
pmtransflag_t  flags,
alpm_trans_cb_event  event,
alpm_trans_cb_conv  conv,
alpm_trans_cb_progress  progress 
)

Initialize the transaction.

Parameters:
type type of the transaction
flags flags of the transaction (like nodeps, etc)
event event callback function pointer
conv question callback function pointer
progress progress callback function pointer
Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 63 of file trans.c.

References _alpm_lckmk(), _alpm_trans_init(), _alpm_trans_new(), ALPM_LOG_FUNC, ASSERT, handle, _pmhandle_t::lckfd, PM_ERR_HANDLE_LOCK, PM_ERR_HANDLE_NULL, PM_ERR_MEMORY, PM_ERR_TRANS_NOT_NULL, RET_ERR, and _pmhandle_t::trans.

Referenced by pacman_add(), and pacman_remove().

Here is the call graph for this function:

Here is the caller graph for this function:

int alpm_trans_interrupt ( void   ) 

Interrupt a transaction.

Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 168 of file trans.c.

References ALPM_LOG_FUNC, ASSERT, handle, PM_ERR_HANDLE_NULL, PM_ERR_TRANS_NULL, PM_ERR_TRANS_TYPE, RET_ERR, __pmtrans_t::state, STATE_COMMITING, STATE_INTERRUPTED, and _pmhandle_t::trans.

int alpm_trans_prepare ( alpm_list_t **  data  ) 

Prepare a transaction.

Parameters:
data the address of an alpm_list where detailed description of an error can be dumped (ie. list of conflicting files)
Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 133 of file trans.c.

References _alpm_trans_prepare(), ALPM_LOG_FUNC, ASSERT, handle, PM_ERR_HANDLE_NULL, PM_ERR_TRANS_NOT_INITIALIZED, PM_ERR_TRANS_NULL, PM_ERR_WRONG_ARGS, RET_ERR, __pmtrans_t::state, STATE_INITIALIZED, and _pmhandle_t::trans.

Referenced by pacman_add(), and pacman_remove().

Here is the call graph for this function:

Here is the caller graph for this function:

int alpm_trans_release ( void   ) 

Release a transaction.

Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 190 of file trans.c.

References _, _alpm_lckrm(), _alpm_log(), _alpm_trans_free(), ALPM_LOG_FUNC, alpm_logaction(), alpm_option_get_lockfile(), ASSERT, handle, _pmhandle_t::lckfd, PM_ERR_HANDLE_NULL, PM_ERR_TRANS_NULL, PM_LOG_WARNING, RET_ERR, __pmtrans_t::state, STATE_IDLE, and _pmhandle_t::trans.

Here is the call graph for this function:

int alpm_trans_sysupgrade ( void   ) 

Search for packages to upgrade and add them to the transaction.

Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 91 of file trans.c.

References _alpm_trans_sysupgrade(), ALPM_LOG_FUNC, ASSERT, handle, PM_ERR_HANDLE_NULL, PM_ERR_TRANS_NOT_INITIALIZED, PM_ERR_TRANS_NULL, PM_ERR_TRANS_TYPE, PM_TRANS_TYPE_SYNC, RET_ERR, __pmtrans_t::state, STATE_INITIALIZED, _pmhandle_t::trans, and __pmtrans_t::type.

Here is the call graph for this function:


Generated on Tue Jan 15 00:03:15 2008 for libalpm by  doxygen 1.5.4