summaryrefslogtreecommitdiff
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
commit495ba26e63ec5cb6b8def29f4e22ea7c444348d8 (patch)
treef132a043c54d6059b55a617e100cd859b6c2d7ef
parent3189d3bc4a7b5f3e92db14256e307e9a58071b2a (diff)
downloadpacman-495ba26e63ec5cb6b8def29f4e22ea7c444348d8.tar.xz
Prefix alpm_transconv_t members with ALPM
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/alpm.h14
-rw-r--r--lib/libalpm/deps.c6
-rw-r--r--lib/libalpm/sync.c10
-rw-r--r--src/pacman/callback.c14
4 files changed, 22 insertions, 22 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 22861ffb..c9b2c850 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -849,13 +849,13 @@ typedef enum _alpm_transevt_t {
/** Transaction Conversations (ie, questions) */
typedef enum _alpm_transconv_t {
- PM_TRANS_CONV_INSTALL_IGNOREPKG = 1,
- PM_TRANS_CONV_REPLACE_PKG = (1 << 1),
- PM_TRANS_CONV_CONFLICT_PKG = (1 << 2),
- PM_TRANS_CONV_CORRUPTED_PKG = (1 << 3),
- PM_TRANS_CONV_LOCAL_NEWER = (1 << 4),
- PM_TRANS_CONV_REMOVE_PKGS = (1 << 5),
- PM_TRANS_CONV_SELECT_PROVIDER = (1 << 6),
+ ALPM_TRANS_CONV_INSTALL_IGNOREPKG = 1,
+ ALPM_TRANS_CONV_REPLACE_PKG = (1 << 1),
+ ALPM_TRANS_CONV_CONFLICT_PKG = (1 << 2),
+ ALPM_TRANS_CONV_CORRUPTED_PKG = (1 << 3),
+ ALPM_TRANS_CONV_LOCAL_NEWER = (1 << 4),
+ ALPM_TRANS_CONV_REMOVE_PKGS = (1 << 5),
+ ALPM_TRANS_CONV_SELECT_PROVIDER = (1 << 6),
} alpm_transconv_t;
/** Transaction Progress */
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 066f5703..f06e93cd 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -570,7 +570,7 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
if(_alpm_pkg_should_ignore(handle, pkg)) {
int install = 0;
if(prompt) {
- QUESTION(handle->trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, pkg,
+ QUESTION(handle->trans, ALPM_TRANS_CONV_INSTALL_IGNOREPKG, pkg,
NULL, NULL, &install);
} else {
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package %s-%s\n"), pkg->name, pkg->version);
@@ -592,7 +592,7 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
if(_alpm_pkg_should_ignore(handle, pkg)) {
int install = 0;
if(prompt) {
- QUESTION(handle->trans, PM_TRANS_CONV_INSTALL_IGNOREPKG,
+ QUESTION(handle->trans, ALPM_TRANS_CONV_INSTALL_IGNOREPKG,
pkg, NULL, NULL, &install);
} else {
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package %s-%s\n"), pkg->name, pkg->version);
@@ -624,7 +624,7 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
int index = 0;
if(count > 1) {
/* if there is more than one provider, we ask the user */
- QUESTION(handle->trans, PM_TRANS_CONV_SELECT_PROVIDER,
+ QUESTION(handle->trans, ALPM_TRANS_CONV_SELECT_PROVIDER,
providers, dep, NULL, &index);
}
if(index >= 0 && index < count) {
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 77f3bbaf..f179f8e7 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -163,7 +163,7 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
}
int doreplace = 0;
- QUESTION(trans, PM_TRANS_CONV_REPLACE_PKG, lpkg, spkg, sdb->treename, &doreplace);
+ QUESTION(trans, ALPM_TRANS_CONV_REPLACE_PKG, lpkg, spkg, sdb->treename, &doreplace);
if(!doreplace) {
continue;
}
@@ -234,7 +234,7 @@ alpm_list_t SYMEXPORT *alpm_find_group_pkgs(alpm_list_t *dbs,
if(_alpm_pkg_should_ignore(db->handle, pkg)) {
ignorelist = alpm_list_add(ignorelist, pkg);
int install = 0;
- QUESTION(db->handle->trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, pkg,
+ QUESTION(db->handle->trans, ALPM_TRANS_CONV_INSTALL_IGNOREPKG, pkg,
NULL, NULL, &install);
if(!install)
continue;
@@ -353,7 +353,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
see if they'd like to ignore them rather than failing the sync */
if(unresolvable != NULL) {
int remove_unresolvable = 0;
- QUESTION(trans, PM_TRANS_CONV_REMOVE_PKGS, unresolvable,
+ QUESTION(trans, ALPM_TRANS_CONV_REMOVE_PKGS, unresolvable,
NULL, NULL, &remove_unresolvable);
if(remove_unresolvable) {
/* User wants to remove the unresolvable packages from the
@@ -485,7 +485,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
alpm_pkg_t *sync = _alpm_pkg_find(trans->add, conflict->package1);
alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2);
int doremove = 0;
- QUESTION(trans, PM_TRANS_CONV_CONFLICT_PKG, conflict->package1,
+ QUESTION(trans, ALPM_TRANS_CONV_CONFLICT_PKG, conflict->package1,
conflict->package2, conflict->reason, &doremove);
if(doremove) {
/* append to the removes list */
@@ -679,7 +679,7 @@ static int test_md5sum(alpm_trans_t *trans, const char *filepath,
int ret = _alpm_test_md5sum(filepath, md5sum);
if(ret == 1) {
int doremove = 0;
- QUESTION(trans, PM_TRANS_CONV_CORRUPTED_PKG, (char *)filepath,
+ QUESTION(trans, ALPM_TRANS_CONV_CORRUPTED_PKG, (char *)filepath,
NULL, NULL, &doremove);
if(doremove) {
unlink(filepath);
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 6a65cbb0..b5d0b68e 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -255,7 +255,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
void *data3, int *response)
{
switch(event) {
- case PM_TRANS_CONV_INSTALL_IGNOREPKG:
+ case ALPM_TRANS_CONV_INSTALL_IGNOREPKG:
if(!config->op_s_downloadonly) {
*response = yesno(_(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"),
alpm_pkg_get_name(data1));
@@ -263,13 +263,13 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
*response = 1;
}
break;
- case PM_TRANS_CONV_REPLACE_PKG:
+ case ALPM_TRANS_CONV_REPLACE_PKG:
*response = yesno(_(":: Replace %s with %s/%s?"),
alpm_pkg_get_name(data1),
(char *)data3,
alpm_pkg_get_name(data2));
break;
- case PM_TRANS_CONV_CONFLICT_PKG:
+ case ALPM_TRANS_CONV_CONFLICT_PKG:
/* data parameters: target package, local package, conflict (strings) */
/* print conflict only if it contains new information */
if(strcmp(data1, data3) == 0 || strcmp(data2, data3) == 0) {
@@ -285,7 +285,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
(char *)data2);
}
break;
- case PM_TRANS_CONV_REMOVE_PKGS:
+ case ALPM_TRANS_CONV_REMOVE_PKGS:
{
alpm_list_t *unresolved = (alpm_list_t *) data1;
alpm_list_t *namelist = NULL, *i;
@@ -308,7 +308,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
alpm_list_free(namelist);
}
break;
- case PM_TRANS_CONV_SELECT_PROVIDER:
+ case ALPM_TRANS_CONV_SELECT_PROVIDER:
{
alpm_list_t *providers = (alpm_list_t *)data1;
int count = alpm_list_count(providers);
@@ -320,7 +320,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
*response = select_question(count);
}
break;
- case PM_TRANS_CONV_LOCAL_NEWER:
+ case ALPM_TRANS_CONV_LOCAL_NEWER:
if(!config->op_s_downloadonly) {
*response = yesno(_(":: %s-%s: local version is newer. Upgrade anyway?"),
alpm_pkg_get_name(data1),
@@ -329,7 +329,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
*response = 1;
}
break;
- case PM_TRANS_CONV_CORRUPTED_PKG:
+ case ALPM_TRANS_CONV_CORRUPTED_PKG:
*response = yesno(_(":: File %s is corrupted. Do you want to delete it?"),
(char *)data1);
break;