summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c6
-rw-r--r--lib/libalpm/alpm.h2
-rw-r--r--lib/libalpm/conflict.c2
-rw-r--r--lib/libalpm/diskspace.c2
-rw-r--r--lib/libalpm/handle.h2
-rw-r--r--lib/libalpm/remove.c10
-rw-r--r--lib/libalpm/sync.c12
-rw-r--r--lib/libalpm/trans.c14
-rw-r--r--lib/libalpm/trans.h6
9 files changed, 28 insertions, 28 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 27bd04d2..3455744f 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -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;
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 6bff5567..16a30a41 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -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 {
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index d269a066..8a626be6 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -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;
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
index 2bc382e4..7ca72c3c 100644
--- a/lib/libalpm/diskspace.c
+++ b/lib/libalpm/diskspace.c
@@ -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);
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index 35fe4877..c0078b0b 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -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 */
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index bc290736..aab49f13 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -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);
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 86cd48ce..f447c067 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -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);
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 73dd6a42..fdcdcdc6 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -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;
diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h
index 87238e4a..8fd01ae3 100644
--- a/lib/libalpm/trans.h
+++ b/lib/libalpm/trans.h
@@ -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,