1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-11 03:54:59 -05:00

Prefix alpm_transconv_t members with ALPM

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2011-07-02 02:01:39 +10:00
parent 3189d3bc4a
commit 495ba26e63
4 changed files with 22 additions and 22 deletions

View File

@ -849,13 +849,13 @@ typedef enum _alpm_transevt_t {
/** Transaction Conversations (ie, questions) */ /** Transaction Conversations (ie, questions) */
typedef enum _alpm_transconv_t { typedef enum _alpm_transconv_t {
PM_TRANS_CONV_INSTALL_IGNOREPKG = 1, ALPM_TRANS_CONV_INSTALL_IGNOREPKG = 1,
PM_TRANS_CONV_REPLACE_PKG = (1 << 1), ALPM_TRANS_CONV_REPLACE_PKG = (1 << 1),
PM_TRANS_CONV_CONFLICT_PKG = (1 << 2), ALPM_TRANS_CONV_CONFLICT_PKG = (1 << 2),
PM_TRANS_CONV_CORRUPTED_PKG = (1 << 3), ALPM_TRANS_CONV_CORRUPTED_PKG = (1 << 3),
PM_TRANS_CONV_LOCAL_NEWER = (1 << 4), ALPM_TRANS_CONV_LOCAL_NEWER = (1 << 4),
PM_TRANS_CONV_REMOVE_PKGS = (1 << 5), ALPM_TRANS_CONV_REMOVE_PKGS = (1 << 5),
PM_TRANS_CONV_SELECT_PROVIDER = (1 << 6), ALPM_TRANS_CONV_SELECT_PROVIDER = (1 << 6),
} alpm_transconv_t; } alpm_transconv_t;
/** Transaction Progress */ /** Transaction Progress */

View File

@ -570,7 +570,7 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
if(_alpm_pkg_should_ignore(handle, pkg)) { if(_alpm_pkg_should_ignore(handle, pkg)) {
int install = 0; int install = 0;
if(prompt) { if(prompt) {
QUESTION(handle->trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, pkg, QUESTION(handle->trans, ALPM_TRANS_CONV_INSTALL_IGNOREPKG, pkg,
NULL, NULL, &install); NULL, NULL, &install);
} else { } else {
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package %s-%s\n"), pkg->name, pkg->version); _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)) { if(_alpm_pkg_should_ignore(handle, pkg)) {
int install = 0; int install = 0;
if(prompt) { if(prompt) {
QUESTION(handle->trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, QUESTION(handle->trans, ALPM_TRANS_CONV_INSTALL_IGNOREPKG,
pkg, NULL, NULL, &install); pkg, NULL, NULL, &install);
} else { } else {
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package %s-%s\n"), pkg->name, pkg->version); _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; int index = 0;
if(count > 1) { if(count > 1) {
/* if there is more than one provider, we ask the user */ /* 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); providers, dep, NULL, &index);
} }
if(index >= 0 && index < count) { if(index >= 0 && index < count) {

View File

@ -163,7 +163,7 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
} }
int doreplace = 0; 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) { if(!doreplace) {
continue; 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)) { if(_alpm_pkg_should_ignore(db->handle, pkg)) {
ignorelist = alpm_list_add(ignorelist, pkg); ignorelist = alpm_list_add(ignorelist, pkg);
int install = 0; 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); NULL, NULL, &install);
if(!install) if(!install)
continue; 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 */ see if they'd like to ignore them rather than failing the sync */
if(unresolvable != NULL) { if(unresolvable != NULL) {
int remove_unresolvable = 0; int remove_unresolvable = 0;
QUESTION(trans, PM_TRANS_CONV_REMOVE_PKGS, unresolvable, QUESTION(trans, ALPM_TRANS_CONV_REMOVE_PKGS, unresolvable,
NULL, NULL, &remove_unresolvable); NULL, NULL, &remove_unresolvable);
if(remove_unresolvable) { if(remove_unresolvable) {
/* User wants to remove the unresolvable packages from the /* 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 *sync = _alpm_pkg_find(trans->add, conflict->package1);
alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2); alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2);
int doremove = 0; 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); conflict->package2, conflict->reason, &doremove);
if(doremove) { if(doremove) {
/* append to the removes list */ /* 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); int ret = _alpm_test_md5sum(filepath, md5sum);
if(ret == 1) { if(ret == 1) {
int doremove = 0; int doremove = 0;
QUESTION(trans, PM_TRANS_CONV_CORRUPTED_PKG, (char *)filepath, QUESTION(trans, ALPM_TRANS_CONV_CORRUPTED_PKG, (char *)filepath,
NULL, NULL, &doremove); NULL, NULL, &doremove);
if(doremove) { if(doremove) {
unlink(filepath); unlink(filepath);

View File

@ -255,7 +255,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
void *data3, int *response) void *data3, int *response)
{ {
switch(event) { switch(event) {
case PM_TRANS_CONV_INSTALL_IGNOREPKG: case ALPM_TRANS_CONV_INSTALL_IGNOREPKG:
if(!config->op_s_downloadonly) { if(!config->op_s_downloadonly) {
*response = yesno(_(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"), *response = yesno(_(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"),
alpm_pkg_get_name(data1)); alpm_pkg_get_name(data1));
@ -263,13 +263,13 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
*response = 1; *response = 1;
} }
break; break;
case PM_TRANS_CONV_REPLACE_PKG: case ALPM_TRANS_CONV_REPLACE_PKG:
*response = yesno(_(":: Replace %s with %s/%s?"), *response = yesno(_(":: Replace %s with %s/%s?"),
alpm_pkg_get_name(data1), alpm_pkg_get_name(data1),
(char *)data3, (char *)data3,
alpm_pkg_get_name(data2)); alpm_pkg_get_name(data2));
break; break;
case PM_TRANS_CONV_CONFLICT_PKG: case ALPM_TRANS_CONV_CONFLICT_PKG:
/* data parameters: target package, local package, conflict (strings) */ /* data parameters: target package, local package, conflict (strings) */
/* print conflict only if it contains new information */ /* print conflict only if it contains new information */
if(strcmp(data1, data3) == 0 || strcmp(data2, data3) == 0) { 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); (char *)data2);
} }
break; break;
case PM_TRANS_CONV_REMOVE_PKGS: case ALPM_TRANS_CONV_REMOVE_PKGS:
{ {
alpm_list_t *unresolved = (alpm_list_t *) data1; alpm_list_t *unresolved = (alpm_list_t *) data1;
alpm_list_t *namelist = NULL, *i; 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); alpm_list_free(namelist);
} }
break; break;
case PM_TRANS_CONV_SELECT_PROVIDER: case ALPM_TRANS_CONV_SELECT_PROVIDER:
{ {
alpm_list_t *providers = (alpm_list_t *)data1; alpm_list_t *providers = (alpm_list_t *)data1;
int count = alpm_list_count(providers); 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); *response = select_question(count);
} }
break; break;
case PM_TRANS_CONV_LOCAL_NEWER: case ALPM_TRANS_CONV_LOCAL_NEWER:
if(!config->op_s_downloadonly) { if(!config->op_s_downloadonly) {
*response = yesno(_(":: %s-%s: local version is newer. Upgrade anyway?"), *response = yesno(_(":: %s-%s: local version is newer. Upgrade anyway?"),
alpm_pkg_get_name(data1), alpm_pkg_get_name(data1),
@ -329,7 +329,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2,
*response = 1; *response = 1;
} }
break; 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?"), *response = yesno(_(":: File %s is corrupted. Do you want to delete it?"),
(char *)data1); (char *)data1);
break; break;