summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-07-02 02:01:39 +1000
committerAllan McRae <allan@archlinux.org>2011-07-02 02:01:39 +1000
commit3189d3bc4a7b5f3e92db14256e307e9a58071b2a (patch)
treee26f0d2b6fa8e77307d19fc4a8cce5606e7ea79c /lib/libalpm
parent39262acab6b956bbc4491d3b90e967a09828e732 (diff)
Prefix alpm_transevt_t members with ALPM
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/add.c8
-rw-r--r--lib/libalpm/alpm.h54
-rw-r--r--lib/libalpm/remove.c8
-rw-r--r--lib/libalpm/sync.c36
-rw-r--r--lib/libalpm/util.c2
5 files changed, 54 insertions, 54 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 71aca940..2a8f3862 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -471,7 +471,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
/* we'll need to save some record for backup checks later */
oldpkg = _alpm_pkg_dup(local);
- EVENT(trans, PM_TRANS_EVT_UPGRADE_START, newpkg, oldpkg);
+ EVENT(trans, ALPM_TRANS_EVT_UPGRADE_START, newpkg, oldpkg);
_alpm_log(handle, ALPM_LOG_DEBUG, "upgrading package %s-%s\n",
newpkg->name, newpkg->version);
@@ -486,7 +486,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
} else {
is_upgrade = 0;
- EVENT(trans, PM_TRANS_EVT_ADD_START, newpkg, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_ADD_START, newpkg, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "adding package %s-%s\n",
newpkg->name, newpkg->version);
@@ -670,9 +670,9 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
}
if(is_upgrade) {
- EVENT(trans, PM_TRANS_EVT_UPGRADE_DONE, newpkg, oldpkg);
+ EVENT(trans, ALPM_TRANS_EVT_UPGRADE_DONE, newpkg, oldpkg);
} else {
- EVENT(trans, PM_TRANS_EVT_ADD_DONE, newpkg, oldpkg);
+ EVENT(trans, ALPM_TRANS_EVT_ADD_DONE, newpkg, oldpkg);
}
cleanup:
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 488871a7..22861ffb 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -772,79 +772,79 @@ typedef enum _alpm_transflag_t {
*/
typedef enum _alpm_transevt_t {
/** Dependencies will be computed for a package. */
- PM_TRANS_EVT_CHECKDEPS_START = 1,
+ ALPM_TRANS_EVT_CHECKDEPS_START = 1,
/** Dependencies were computed for a package. */
- PM_TRANS_EVT_CHECKDEPS_DONE,
+ ALPM_TRANS_EVT_CHECKDEPS_DONE,
/** File conflicts will be computed for a package. */
- PM_TRANS_EVT_FILECONFLICTS_START,
+ ALPM_TRANS_EVT_FILECONFLICTS_START,
/** File conflicts were computed for a package. */
- PM_TRANS_EVT_FILECONFLICTS_DONE,
+ ALPM_TRANS_EVT_FILECONFLICTS_DONE,
/** Dependencies will be resolved for target package. */
- PM_TRANS_EVT_RESOLVEDEPS_START,
+ ALPM_TRANS_EVT_RESOLVEDEPS_START,
/** Dependencies were resolved for target package. */
- PM_TRANS_EVT_RESOLVEDEPS_DONE,
+ ALPM_TRANS_EVT_RESOLVEDEPS_DONE,
/** Inter-conflicts will be checked for target package. */
- PM_TRANS_EVT_INTERCONFLICTS_START,
+ ALPM_TRANS_EVT_INTERCONFLICTS_START,
/** Inter-conflicts were checked for target package. */
- PM_TRANS_EVT_INTERCONFLICTS_DONE,
+ ALPM_TRANS_EVT_INTERCONFLICTS_DONE,
/** Package will be installed.
* A pointer to the target package is passed to the callback.
*/
- PM_TRANS_EVT_ADD_START,
+ ALPM_TRANS_EVT_ADD_START,
/** Package was installed.
* A pointer to the new package is passed to the callback.
*/
- PM_TRANS_EVT_ADD_DONE,
+ ALPM_TRANS_EVT_ADD_DONE,
/** Package will be removed.
* A pointer to the target package is passed to the callback.
*/
- PM_TRANS_EVT_REMOVE_START,
+ ALPM_TRANS_EVT_REMOVE_START,
/** Package was removed.
* A pointer to the removed package is passed to the callback.
*/
- PM_TRANS_EVT_REMOVE_DONE,
+ ALPM_TRANS_EVT_REMOVE_DONE,
/** Package will be upgraded.
* A pointer to the upgraded package is passed to the callback.
*/
- PM_TRANS_EVT_UPGRADE_START,
+ ALPM_TRANS_EVT_UPGRADE_START,
/** Package was upgraded.
* A pointer to the new package, and a pointer to the old package is passed
* to the callback, respectively.
*/
- PM_TRANS_EVT_UPGRADE_DONE,
+ ALPM_TRANS_EVT_UPGRADE_DONE,
/** Target package's integrity will be checked. */
- PM_TRANS_EVT_INTEGRITY_START,
+ ALPM_TRANS_EVT_INTEGRITY_START,
/** Target package's integrity was checked. */
- PM_TRANS_EVT_INTEGRITY_DONE,
+ ALPM_TRANS_EVT_INTEGRITY_DONE,
/** Target deltas's integrity will be checked. */
- PM_TRANS_EVT_DELTA_INTEGRITY_START,
+ ALPM_TRANS_EVT_DELTA_INTEGRITY_START,
/** Target delta's integrity was checked. */
- PM_TRANS_EVT_DELTA_INTEGRITY_DONE,
+ ALPM_TRANS_EVT_DELTA_INTEGRITY_DONE,
/** Deltas will be applied to packages. */
- PM_TRANS_EVT_DELTA_PATCHES_START,
+ ALPM_TRANS_EVT_DELTA_PATCHES_START,
/** Deltas were applied to packages. */
- PM_TRANS_EVT_DELTA_PATCHES_DONE,
+ ALPM_TRANS_EVT_DELTA_PATCHES_DONE,
/** Delta patch will be applied to target package.
* The filename of the package and the filename of the patch is passed to the
* callback.
*/
- PM_TRANS_EVT_DELTA_PATCH_START,
+ ALPM_TRANS_EVT_DELTA_PATCH_START,
/** Delta patch was applied to target package. */
- PM_TRANS_EVT_DELTA_PATCH_DONE,
+ ALPM_TRANS_EVT_DELTA_PATCH_DONE,
/** Delta patch failed to apply to target package. */
- PM_TRANS_EVT_DELTA_PATCH_FAILED,
+ ALPM_TRANS_EVT_DELTA_PATCH_FAILED,
/** Scriptlet has printed information.
* A line of text is passed to the callback.
*/
- PM_TRANS_EVT_SCRIPTLET_INFO,
+ ALPM_TRANS_EVT_SCRIPTLET_INFO,
/** Files will be downloaded from a repository.
* The repository's tree name is passed to the callback.
*/
- PM_TRANS_EVT_RETRIEVE_START,
+ ALPM_TRANS_EVT_RETRIEVE_START,
/** Disk space usage will be computed for a package */
- PM_TRANS_EVT_DISKSPACE_START,
+ ALPM_TRANS_EVT_DISKSPACE_START,
/** Disk space usage was computed for a package */
- PM_TRANS_EVT_DISKSPACE_DONE,
+ ALPM_TRANS_EVT_DISKSPACE_DONE,
} alpm_transevt_t;
/** Transaction Conversations (ie, questions) */
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index ed9f2767..ec8ba119 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -147,7 +147,7 @@ int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
}
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
- EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "looking for unsatisfied dependencies\n");
lp = alpm_checkdeps(handle, _alpm_db_get_pkgcache(db), trans->remove, NULL, 1);
@@ -185,7 +185,7 @@ int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
}
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
- EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
}
return 0;
@@ -378,7 +378,7 @@ int _alpm_remove_packages(alpm_handle_t *handle)
snprintf(scriptlet, PATH_MAX, "%s%s-%s/install",
_alpm_db_path(handle->db_local), pkgname, alpm_pkg_get_version(info));
- EVENT(trans, PM_TRANS_EVT_REMOVE_START, info, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_REMOVE_START, info, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "removing package %s-%s\n",
pkgname, alpm_pkg_get_version(info));
@@ -446,7 +446,7 @@ int _alpm_remove_packages(alpm_handle_t *handle)
pkgname);
}
- EVENT(trans, PM_TRANS_EVT_REMOVE_DONE, info, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_REMOVE_DONE, info, NULL);
}
/* run ldconfig if it exists */
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 410cbc7d..77f3bbaf 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -320,7 +320,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
/* Build up list by repeatedly resolving each transaction package */
/* Resolve targets dependencies */
- EVENT(trans, PM_TRANS_EVT_RESOLVEDEPS_START, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_RESOLVEDEPS_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "resolving target's dependencies\n");
/* build remove list for resolvedeps */
@@ -391,12 +391,12 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
trans->add = _alpm_sortbydeps(handle, resolved, 0);
alpm_list_free(resolved);
- EVENT(trans, PM_TRANS_EVT_RESOLVEDEPS_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_RESOLVEDEPS_DONE, NULL, NULL);
}
if(!(trans->flags & ALPM_TRANS_FLAG_NOCONFLICTS)) {
/* check for inter-conflicts and whatnot */
- EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_START, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_INTERCONFLICTS_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "looking for conflicts\n");
@@ -506,7 +506,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
goto cleanup;
}
}
- EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_INTERCONFLICTS_DONE, NULL, NULL);
alpm_list_free_inner(deps, (alpm_list_fn_free)_alpm_conflict_free);
alpm_list_free(deps);
}
@@ -629,11 +629,11 @@ static int apply_deltas(alpm_handle_t *handle)
_alpm_log(handle, ALPM_LOG_DEBUG, "command: %s\n", command);
- EVENT(trans, PM_TRANS_EVT_DELTA_PATCH_START, d->to, d->delta);
+ EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCH_START, d->to, d->delta);
int retval = system(command);
if(retval == 0) {
- EVENT(trans, PM_TRANS_EVT_DELTA_PATCH_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCH_DONE, NULL, NULL);
/* delete the delta file */
unlink(delta);
@@ -651,7 +651,7 @@ static int apply_deltas(alpm_handle_t *handle)
if(retval != 0) {
/* one delta failed for this package, cancel the remaining ones */
- EVENT(trans, PM_TRANS_EVT_DELTA_PATCH_FAILED, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCH_FAILED, NULL, NULL);
handle->pm_errno = PM_ERR_DLT_PATCHFAILED;
ret = 1;
break;
@@ -701,7 +701,7 @@ static int validate_deltas(alpm_handle_t *handle, alpm_list_t *deltas,
}
/* Check integrity of deltas */
- EVENT(trans, PM_TRANS_EVT_DELTA_INTEGRITY_START, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_DELTA_INTEGRITY_START, NULL, NULL);
for(i = deltas; i; i = i->next) {
alpm_delta_t *d = alpm_list_getdata(i);
@@ -717,12 +717,12 @@ static int validate_deltas(alpm_handle_t *handle, alpm_list_t *deltas,
handle->pm_errno = PM_ERR_DLT_INVALID;
return -1;
}
- EVENT(trans, PM_TRANS_EVT_DELTA_INTEGRITY_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_DELTA_INTEGRITY_DONE, NULL, NULL);
/* Use the deltas to generate the packages */
- EVENT(trans, PM_TRANS_EVT_DELTA_PATCHES_START, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCHES_START, NULL, NULL);
ret = apply_deltas(handle);
- EVENT(trans, PM_TRANS_EVT_DELTA_PATCHES_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCHES_DONE, NULL, NULL);
return ret;
}
@@ -782,7 +782,7 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
}
if(files) {
- EVENT(handle->trans, PM_TRANS_EVT_RETRIEVE_START, current->treename, NULL);
+ EVENT(handle->trans, ALPM_TRANS_EVT_RETRIEVE_START, current->treename, NULL);
for(j = files; j; j = j->next) {
const char *filename = j->data;
alpm_list_t *server;
@@ -854,7 +854,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
/* Check integrity of packages */
numtargs = alpm_list_count(trans->add);
- EVENT(trans, PM_TRANS_EVT_INTEGRITY_START, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_INTEGRITY_START, NULL, NULL);
errors = 0;
@@ -897,7 +897,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
PROGRESS(trans, PM_TRANS_PROGRESS_INTEGRITY_START, "", 100,
numtargs, current);
- EVENT(trans, PM_TRANS_EVT_INTEGRITY_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_INTEGRITY_DONE, NULL, NULL);
if(errors) {
@@ -914,7 +914,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
/* fileconflict check */
if(!(trans->flags & ALPM_TRANS_FLAG_FORCE)) {
- EVENT(trans, PM_TRANS_EVT_FILECONFLICTS_START, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_FILECONFLICTS_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "looking for file conflicts\n");
alpm_list_t *conflict = _alpm_db_find_fileconflicts(handle,
@@ -929,12 +929,12 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
RET_ERR(handle, PM_ERR_FILE_CONFLICTS, -1);
}
- EVENT(trans, PM_TRANS_EVT_FILECONFLICTS_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_FILECONFLICTS_DONE, NULL, NULL);
}
/* check available disk space */
if(handle->checkspace) {
- EVENT(trans, PM_TRANS_EVT_DISKSPACE_START, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_DISKSPACE_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "checking available disk space\n");
if(_alpm_check_diskspace(handle) == -1) {
@@ -942,7 +942,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
return -1;
}
- EVENT(trans, PM_TRANS_EVT_DISKSPACE_DONE, NULL, NULL);
+ EVENT(trans, ALPM_TRANS_EVT_DISKSPACE_DONE, NULL, NULL);
}
/* remove conflicting and to-be-replaced packages */
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 5d80a0e3..ab4051b8 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -500,7 +500,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *path, char *const argv[]
if(fgets(line, PATH_MAX, pipe_file) == NULL)
break;
alpm_logaction(handle, "%s", line);
- EVENT(handle->trans, PM_TRANS_EVT_SCRIPTLET_INFO, line, NULL);
+ EVENT(handle->trans, ALPM_TRANS_EVT_SCRIPTLET_INFO, line, NULL);
}
fclose(pipe_file);
}