summaryrefslogtreecommitdiff
path: root/src
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
commitafc96f2ab3d05f14a73e81f871164f01423b5572 (patch)
tree16ff0c0f2390b51ed43cfaa1a9ec508678793ec6 /src
parentbd88a8d5511c24db55dd2a5c04161918571dbfbd (diff)
Prefix _alpm_errno_t members with ALPM
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/conf.c2
-rw-r--r--src/pacman/remove.c4
-rw-r--r--src/pacman/sync.c18
-rw-r--r--src/pacman/upgrade.c12
-rw-r--r--src/pacman/util.c2
-rw-r--r--src/util/testpkg.c6
6 files changed, 22 insertions, 22 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 838f8e94..f2df260e 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -449,7 +449,7 @@ static int setup_libalpm(void)
if(!handle) {
pm_printf(ALPM_LOG_ERROR, _("failed to initialize alpm library (%s)\n"),
alpm_strerror(err));
- if(err == PM_ERR_DB_VERSION) {
+ if(err == ALPM_ERR_DB_VERSION) {
pm_printf(ALPM_LOG_ERROR, _(" try running pacman-db-upgrade\n"));
}
return -1;
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 1221904d..3cedb892 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -106,13 +106,13 @@ int pacman_remove(alpm_list_t *targets)
pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to prepare transaction (%s)\n"),
alpm_strerror(err));
switch(err) {
- case PM_ERR_PKG_INVALID_ARCH:
+ case ALPM_ERR_PKG_INVALID_ARCH:
for(i = data; i; i = alpm_list_next(i)) {
char *pkg = alpm_list_getdata(i);
printf(_(":: package %s does not have a valid architecture\n"), pkg);
}
break;
- case PM_ERR_UNSATISFIED_DEPS:
+ case ALPM_ERR_UNSATISFIED_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
alpm_depmissing_t *miss = alpm_list_getdata(i);
char *depstring = alpm_dep_compute_string(miss->depend);
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index dd6404f7..ad6d5e5c 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -616,8 +616,8 @@ static int process_pkg(alpm_pkg_t *pkg)
if(ret == -1) {
enum _alpm_errno_t err = alpm_errno(config->handle);
- if(err == PM_ERR_TRANS_DUP_TARGET
- || err == PM_ERR_PKG_IGNORED) {
+ if(err == ALPM_ERR_TRANS_DUP_TARGET
+ || err == ALPM_ERR_PKG_IGNORED) {
/* just skip duplicate or ignored targets */
pm_printf(ALPM_LOG_WARNING, _("skipping target: %s\n"), alpm_pkg_get_name(pkg));
return 0;
@@ -681,7 +681,7 @@ static int process_targname(alpm_list_t *dblist, char *targname)
alpm_pkg_t *pkg = alpm_find_dbs_satisfier(config->handle, dblist, targname);
/* #FS#23342 - skip ignored packages when user says no */
- if(alpm_errno(config->handle) == PM_ERR_PKG_IGNORED) {
+ if(alpm_errno(config->handle) == ALPM_ERR_PKG_IGNORED) {
pm_printf(ALPM_LOG_WARNING, _("skipping target: %s\n"), targname);
/* TODO how to do this, we shouldn't be fucking with it from the frontend */
/* pm_errno = 0; */
@@ -767,13 +767,13 @@ static int sync_trans(alpm_list_t *targets)
pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to prepare transaction (%s)\n"),
alpm_strerror(err));
switch(err) {
- case PM_ERR_PKG_INVALID_ARCH:
+ case ALPM_ERR_PKG_INVALID_ARCH:
for(i = data; i; i = alpm_list_next(i)) {
char *pkg = alpm_list_getdata(i);
printf(_(":: package %s does not have a valid architecture\n"), pkg);
}
break;
- case PM_ERR_UNSATISFIED_DEPS:
+ case ALPM_ERR_UNSATISFIED_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
alpm_depmissing_t *miss = alpm_list_getdata(i);
char *depstring = alpm_dep_compute_string(miss->depend);
@@ -781,7 +781,7 @@ static int sync_trans(alpm_list_t *targets)
free(depstring);
}
break;
- case PM_ERR_CONFLICTING_DEPS:
+ case ALPM_ERR_CONFLICTING_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
alpm_conflict_t *conflict = alpm_list_getdata(i);
/* only print reason if it contains new information */
@@ -834,7 +834,7 @@ static int sync_trans(alpm_list_t *targets)
pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to commit transaction (%s)\n"),
alpm_strerror(err));
switch(err) {
- case PM_ERR_FILE_CONFLICTS:
+ case ALPM_ERR_FILE_CONFLICTS:
for(i = data; i; i = alpm_list_next(i)) {
alpm_fileconflict_t *conflict = alpm_list_getdata(i);
switch(conflict->type) {
@@ -849,8 +849,8 @@ static int sync_trans(alpm_list_t *targets)
}
}
break;
- case PM_ERR_PKG_INVALID:
- case PM_ERR_DLT_INVALID:
+ case ALPM_ERR_PKG_INVALID:
+ case ALPM_ERR_DLT_INVALID:
for(i = data; i; i = alpm_list_next(i)) {
char *filename = alpm_list_getdata(i);
printf(_("%s is invalid or corrupted\n"), filename);
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index 2f814b0a..95b17cc1 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -98,13 +98,13 @@ int pacman_upgrade(alpm_list_t *targets)
pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to prepare transaction (%s)\n"),
alpm_strerror(err));
switch(err) {
- case PM_ERR_PKG_INVALID_ARCH:
+ case ALPM_ERR_PKG_INVALID_ARCH:
for(i = data; i; i = alpm_list_next(i)) {
char *pkg = alpm_list_getdata(i);
printf(_(":: package %s does not have a valid architecture\n"), pkg);
}
break;
- case PM_ERR_UNSATISFIED_DEPS:
+ case ALPM_ERR_UNSATISFIED_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
alpm_depmissing_t *miss = alpm_list_getdata(i);
char *depstring = alpm_dep_compute_string(miss->depend);
@@ -116,7 +116,7 @@ int pacman_upgrade(alpm_list_t *targets)
free(depstring);
}
break;
- case PM_ERR_CONFLICTING_DEPS:
+ case ALPM_ERR_CONFLICTING_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
alpm_conflict_t *conflict = alpm_list_getdata(i);
if(strcmp(conflict->package1, conflict->reason) == 0 ||
@@ -166,7 +166,7 @@ int pacman_upgrade(alpm_list_t *targets)
pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to commit transaction (%s)\n"),
alpm_strerror(err));
switch(err) {
- case PM_ERR_FILE_CONFLICTS:
+ case ALPM_ERR_FILE_CONFLICTS:
for(i = data; i; i = alpm_list_next(i)) {
alpm_fileconflict_t *conflict = alpm_list_getdata(i);
switch(conflict->type) {
@@ -181,8 +181,8 @@ int pacman_upgrade(alpm_list_t *targets)
}
}
break;
- case PM_ERR_PKG_INVALID:
- case PM_ERR_DLT_INVALID:
+ case ALPM_ERR_PKG_INVALID:
+ case ALPM_ERR_DLT_INVALID:
for(i = data; i; i = alpm_list_next(i)) {
char *filename = alpm_list_getdata(i);
printf(_("%s is invalid or corrupted\n"), filename);
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 2f55027a..9ced7aad 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -63,7 +63,7 @@ int trans_init(alpm_transflag_t flags)
enum _alpm_errno_t err = alpm_errno(config->handle);
pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to init transaction (%s)\n"),
alpm_strerror(err));
- if(err == PM_ERR_HANDLE_LOCK) {
+ if(err == ALPM_ERR_HANDLE_LOCK) {
fprintf(stderr, _(" if you're sure a package manager is not already\n"
" running, you can remove %s\n"),
alpm_option_get_lockfile(config->handle));
diff --git a/src/util/testpkg.c b/src/util/testpkg.c
index cfde486a..03234ed5 100644
--- a/src/util/testpkg.c
+++ b/src/util/testpkg.c
@@ -62,11 +62,11 @@ int main(int argc, char *argv[])
|| pkg == NULL) {
err = alpm_errno(handle);
switch(err) {
- case PM_ERR_PKG_OPEN:
+ case ALPM_ERR_PKG_OPEN:
printf("Cannot open the given file.\n");
break;
- case PM_ERR_LIBARCHIVE:
- case PM_ERR_PKG_INVALID:
+ case ALPM_ERR_LIBARCHIVE:
+ case ALPM_ERR_PKG_INVALID:
printf("Package is invalid.\n");
break;
default: