mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 07:48:50 -05:00
Rename pmtrans_t to alpm_trans_t
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
8a04bc25a1
commit
6b62508c86
@ -53,7 +53,7 @@
|
||||
int SYMEXPORT alpm_add_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
|
||||
{
|
||||
const char *pkgname, *pkgver;
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
alpm_pkg_t *local;
|
||||
|
||||
/* Sanity checks */
|
||||
@ -458,7 +458,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
|
||||
int is_upgrade = 0;
|
||||
alpm_pkg_t *oldpkg = NULL;
|
||||
alpm_db_t *db = handle->db_local;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
snprintf(scriptlet, PATH_MAX, "%s%s-%s/install",
|
||||
_alpm_db_path(db), alpm_pkg_get_name(newpkg),
|
||||
@ -689,7 +689,7 @@ int _alpm_upgrade_packages(alpm_handle_t *handle)
|
||||
size_t pkg_count, pkg_current;
|
||||
int skip_ldconfig = 0, ret = 0;
|
||||
alpm_list_t *targ;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
if(trans->add == NULL) {
|
||||
return 0;
|
||||
|
@ -103,7 +103,7 @@ typedef enum _pgp_verify_t {
|
||||
typedef struct __alpm_handle_t alpm_handle_t;
|
||||
typedef struct __alpm_db_t alpm_db_t;
|
||||
typedef struct __alpm_pkg_t alpm_pkg_t;
|
||||
typedef struct __pmtrans_t pmtrans_t;
|
||||
typedef struct __alpm_trans_t alpm_trans_t;
|
||||
|
||||
/** Dependency */
|
||||
typedef struct _pmdepend_t {
|
||||
|
@ -368,7 +368,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
|
||||
alpm_list_t *i, *j, *conflicts = NULL;
|
||||
size_t numtargs = alpm_list_count(upgrade);
|
||||
size_t current;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
if(!upgrade) {
|
||||
return NULL;
|
||||
|
@ -264,7 +264,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
|
||||
size_t replaces = 0, current = 0, numtargs;
|
||||
int error = 0;
|
||||
alpm_list_t *targ;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
numtargs = alpm_list_count(trans->add);
|
||||
mount_points = mount_point_list(handle);
|
||||
|
@ -36,7 +36,7 @@ struct __alpm_handle_t {
|
||||
alpm_list_t *dbs_sync; /* List of (alpm_db_t *) */
|
||||
FILE *logstream; /* log file stream pointer */
|
||||
FILE *lckstream; /* lock file stream pointer if one exists */
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
|
||||
#ifdef HAVE_LIBCURL
|
||||
/* libcurl handle */
|
||||
|
@ -47,7 +47,7 @@
|
||||
int SYMEXPORT alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
|
||||
{
|
||||
const char *pkgname;
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
|
||||
/* Sanity checks */
|
||||
CHECK_HANDLE(handle, return -1);
|
||||
@ -72,7 +72,7 @@ int SYMEXPORT alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
|
||||
|
||||
static void remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
|
||||
{
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
while(lp) {
|
||||
alpm_list_t *i;
|
||||
@ -99,7 +99,7 @@ static void remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
|
||||
|
||||
static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
|
||||
{
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
/* Remove needed packages (which break dependencies) from target list */
|
||||
while(lp != NULL) {
|
||||
@ -137,7 +137,7 @@ static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
|
||||
int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
||||
{
|
||||
alpm_list_t *lp;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
alpm_db_t *db = handle->db_local;
|
||||
|
||||
if((trans->flags & PM_TRANS_FLAG_RECURSE) && !(trans->flags & PM_TRANS_FLAG_CASCADE)) {
|
||||
@ -358,7 +358,7 @@ int _alpm_remove_packages(alpm_handle_t *handle)
|
||||
alpm_pkg_t *info;
|
||||
alpm_list_t *targ, *lp;
|
||||
size_t pkg_count;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
pkg_count = alpm_list_count(trans->remove);
|
||||
|
||||
|
@ -86,7 +86,7 @@ alpm_pkg_t SYMEXPORT *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_syn
|
||||
int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
|
||||
{
|
||||
alpm_list_t *i, *j, *k;
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
alpm_db_t *db_local;
|
||||
alpm_list_t *dbs_sync;
|
||||
|
||||
@ -309,7 +309,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
||||
alpm_list_t *unresolvable = NULL;
|
||||
alpm_list_t *remove = NULL;
|
||||
int ret = 0;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
if(data) {
|
||||
*data = NULL;
|
||||
@ -588,7 +588,7 @@ static int apply_deltas(alpm_handle_t *handle)
|
||||
alpm_list_t *i;
|
||||
int ret = 0;
|
||||
const char *cachedir = _alpm_filecache_setup(handle);
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
for(i = trans->add; i; i = i->next) {
|
||||
alpm_pkg_t *spkg = i->data;
|
||||
@ -673,7 +673,7 @@ static int apply_deltas(alpm_handle_t *handle)
|
||||
*
|
||||
* @return 0 if the md5sum matched, 1 if not, -1 in case of errors
|
||||
*/
|
||||
static int test_md5sum(pmtrans_t *trans, const char *filepath,
|
||||
static int test_md5sum(alpm_trans_t *trans, const char *filepath,
|
||||
const char *md5sum)
|
||||
{
|
||||
int ret = _alpm_test_md5sum(filepath, md5sum);
|
||||
@ -694,7 +694,7 @@ static int validate_deltas(alpm_handle_t *handle, alpm_list_t *deltas,
|
||||
{
|
||||
int errors = 0, ret = 0;
|
||||
alpm_list_t *i;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
if(!deltas) {
|
||||
return 0;
|
||||
@ -839,7 +839,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
|
||||
alpm_list_t *deltas = NULL;
|
||||
size_t numtargs, current = 0, replaces = 0;
|
||||
int errors;
|
||||
pmtrans_t *trans = handle->trans;
|
||||
alpm_trans_t *trans = handle->trans;
|
||||
|
||||
if(download_files(handle, &deltas)) {
|
||||
alpm_list_free(deltas);
|
||||
|
@ -52,7 +52,7 @@ int SYMEXPORT alpm_trans_init(alpm_handle_t *handle, pmtransflag_t flags,
|
||||
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
|
||||
alpm_trans_cb_progress progress)
|
||||
{
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
alpm_list_t *i;
|
||||
|
||||
/* Sanity checks */
|
||||
@ -73,7 +73,7 @@ int SYMEXPORT alpm_trans_init(alpm_handle_t *handle, pmtransflag_t flags,
|
||||
}
|
||||
}
|
||||
|
||||
CALLOC(trans, 1, sizeof(pmtrans_t), RET_ERR(handle, PM_ERR_MEMORY, -1));
|
||||
CALLOC(trans, 1, sizeof(alpm_trans_t), RET_ERR(handle, PM_ERR_MEMORY, -1));
|
||||
trans->flags = flags;
|
||||
trans->cb_event = event;
|
||||
trans->cb_conv = conv;
|
||||
@ -113,7 +113,7 @@ static alpm_list_t *check_arch(alpm_handle_t *handle, alpm_list_t *pkgs)
|
||||
/** Prepare a transaction. */
|
||||
int SYMEXPORT alpm_trans_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
||||
{
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
|
||||
/* Sanity checks */
|
||||
CHECK_HANDLE(handle, return -1);
|
||||
@ -157,7 +157,7 @@ int SYMEXPORT alpm_trans_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
||||
/** Commit a transaction. */
|
||||
int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
|
||||
{
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
|
||||
/* Sanity checks */
|
||||
CHECK_HANDLE(handle, return -1);
|
||||
@ -196,7 +196,7 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
|
||||
/** Interrupt a transaction. */
|
||||
int SYMEXPORT alpm_trans_interrupt(alpm_handle_t *handle)
|
||||
{
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
|
||||
/* Sanity checks */
|
||||
CHECK_HANDLE(handle, return -1);
|
||||
@ -214,7 +214,7 @@ int SYMEXPORT alpm_trans_interrupt(alpm_handle_t *handle)
|
||||
/** Release a transaction. */
|
||||
int SYMEXPORT alpm_trans_release(alpm_handle_t *handle)
|
||||
{
|
||||
pmtrans_t *trans;
|
||||
alpm_trans_t *trans;
|
||||
|
||||
/* Sanity checks */
|
||||
CHECK_HANDLE(handle, return -1);
|
||||
@ -243,7 +243,7 @@ int SYMEXPORT alpm_trans_release(alpm_handle_t *handle)
|
||||
|
||||
/** @} */
|
||||
|
||||
void _alpm_trans_free(pmtrans_t *trans)
|
||||
void _alpm_trans_free(alpm_trans_t *trans)
|
||||
{
|
||||
if(trans == NULL) {
|
||||
return;
|
||||
|
@ -36,7 +36,7 @@ typedef enum _pmtransstate_t {
|
||||
} pmtransstate_t;
|
||||
|
||||
/* Transaction */
|
||||
struct __pmtrans_t {
|
||||
struct __alpm_trans_t {
|
||||
pmtransflag_t flags;
|
||||
pmtransstate_t state;
|
||||
alpm_list_t *add; /* list of (alpm_pkg_t *) */
|
||||
@ -66,8 +66,8 @@ do { \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
void _alpm_trans_free(pmtrans_t *trans);
|
||||
int _alpm_trans_init(pmtrans_t *trans, pmtransflag_t flags,
|
||||
void _alpm_trans_free(alpm_trans_t *trans);
|
||||
int _alpm_trans_init(alpm_trans_t *trans, pmtransflag_t flags,
|
||||
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
|
||||
alpm_trans_cb_progress progress);
|
||||
int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn,
|
||||
|
Loading…
Reference in New Issue
Block a user