Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c16
-rw-r--r--lib/libalpm/alpm.h20
-rw-r--r--lib/libalpm/remove.c8
3 files changed, 22 insertions, 22 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 6795216f..661708bf 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -131,7 +131,7 @@ int add_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data)
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
PMList *j;
- TRANS_CB(trans, PM_TRANS_CB_DEPS_START, NULL, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_DEPS_START, NULL, NULL);
lp = checkdeps(db, trans->type, trans->packages);
if(lp != NULL) {
@@ -191,13 +191,13 @@ int add_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data)
FREELIST(trans->packages);
trans->packages = lp;
- TRANS_CB(trans, PM_TRANS_CB_DEPS_DONE, NULL, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_DEPS_DONE, NULL, NULL);
}
/* Check for file conflicts
*/
if(!(trans->flags & PM_TRANS_FLAG_FORCE)) {
- TRANS_CB(trans, PM_TRANS_CB_CONFLICTS_START, NULL, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_CONFLICTS_START, NULL, NULL);
lp = db_find_conflicts(db, trans->packages, handle->root);
if(lp != NULL) {
@@ -205,7 +205,7 @@ int add_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data)
PM_RET_ERR(PM_ERR_FILE_CONFLICTS, -1);
}
- TRANS_CB(trans, PM_TRANS_CB_CONFLICTS_DONE, NULL, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_CONFLICTS_DONE, NULL, NULL);
}
return(0);
@@ -243,7 +243,7 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
/* see if this is an upgrade. if so, remove the old package first */
if(pmo_upgrade) {
if(pkg_isin(info, db_get_pkgcache(db))) {
- TRANS_CB(trans, PM_TRANS_CB_UPGRADE_START, info, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_UPGRADE_START, info, NULL);
/* we'll need the full record for backup checks later */
if((oldpkg = db_scan(db, info->name, INFRQ_ALL)) != NULL) {
@@ -278,7 +278,7 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
}
}
if(!pmo_upgrade) {
- TRANS_CB(trans, PM_TRANS_CB_ADD_START, info, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_ADD_START, info, NULL);
}
/* Add the package to the database */
@@ -559,11 +559,11 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
}
if(pmo_upgrade && oldpkg) {
- TRANS_CB(trans, PM_TRANS_CB_UPGRADE_DONE, info, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_UPGRADE_DONE, info, NULL);
alpm_logaction("upgraded %s (%s -> %s)", info->name,
oldpkg->version, info->version);
} else {
- TRANS_CB(trans, PM_TRANS_CB_ADD_DONE, info, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_ADD_DONE, info, NULL);
alpm_logaction("installed %s (%s)", info->name, info->version);
}
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 85442196..4551b3f9 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -195,16 +195,16 @@ enum {
/* Callback events */
enum {
- PM_TRANS_CB_DEPS_START = 1,
- PM_TRANS_CB_DEPS_DONE,
- PM_TRANS_CB_CONFLICTS_START,
- PM_TRANS_CB_CONFLICTS_DONE,
- PM_TRANS_CB_ADD_START,
- PM_TRANS_CB_ADD_DONE,
- PM_TRANS_CB_REMOVE_START,
- PM_TRANS_CB_REMOVE_DONE,
- PM_TRANS_CB_UPGRADE_START,
- PM_TRANS_CB_UPGRADE_DONE
+ PM_TRANS_EVT_DEPS_START = 1,
+ PM_TRANS_EVT_DEPS_DONE,
+ PM_TRANS_EVT_CONFLICTS_START,
+ PM_TRANS_EVT_CONFLICTS_DONE,
+ PM_TRANS_EVT_ADD_START,
+ PM_TRANS_EVT_ADD_DONE,
+ PM_TRANS_EVT_REMOVE_START,
+ PM_TRANS_EVT_REMOVE_DONE,
+ PM_TRANS_EVT_UPGRADE_START,
+ PM_TRANS_EVT_UPGRADE_DONE
};
/* Callback */
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index c53ffa4d..4a943b3c 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -72,7 +72,7 @@ int remove_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data)
ASSERT(data != NULL, PM_RET_ERR(PM_ERR_WRONG_ARGS, -1));
if(!(trans->flags & (PM_TRANS_FLAG_NODEPS)) && (trans->type != PM_TRANS_TYPE_UPGRADE)) {
- TRANS_CB(trans, PM_TRANS_CB_DEPS_START, NULL, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_DEPS_START, NULL, NULL);
if((lp = checkdeps(db, trans->type, trans->packages)) != NULL) {
if(trans->flags & PM_TRANS_FLAG_CASCADE) {
@@ -99,7 +99,7 @@ int remove_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data)
trans->packages = removedeps(db, trans->packages);
}
- TRANS_CB(trans, PM_TRANS_CB_DEPS_DONE, NULL, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_DEPS_DONE, NULL, NULL);
}
return(0);
@@ -120,7 +120,7 @@ int remove_commit(pmdb_t *db, pmtrans_t *trans)
info = (pmpkg_t*)targ->data;
if(trans->type != PM_TRANS_TYPE_UPGRADE) {
- TRANS_CB(trans, PM_TRANS_CB_REMOVE_START, info, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_REMOVE_START, info, NULL);
/* run the pre-remove scriptlet if it exists */
snprintf(pm_install, PATH_MAX, "%s%s/%s/%s-%s/install", handle->root, handle->dbpath, db->treename, info->name, info->version);
@@ -241,7 +241,7 @@ int remove_commit(pmdb_t *db, pmtrans_t *trans)
}
if(trans->type != PM_TRANS_TYPE_UPGRADE) {
- TRANS_CB(trans, PM_TRANS_CB_REMOVE_DONE, info, NULL);
+ TRANS_CB(trans, PM_TRANS_EVT_REMOVE_DONE, info, NULL);
alpm_logaction("removed %s (%s)", info->name, info->version);
}
}