diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-07 16:06:16 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-13 19:38:38 -0500 |
commit | e2aa952689da8763d534d1c19310eb97009f4f76 (patch) | |
tree | 7d022d67801bc01c24fef985feb9a617c48d316a /src/pacman/conf.c | |
parent | 8b62d9bc0ade64897990b8fc6a1b6a54b629cb5b (diff) |
Move pm_errno onto the handle
This involves some serious changes and a very messy diff, unfortunately.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/conf.c')
-rw-r--r-- | src/pacman/conf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 1ee0444d..3b9dff78 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -402,7 +402,7 @@ static int _add_mirror(pmdb_t *db, char *value) if(alpm_db_add_server(db, server) != 0) { /* pm_errno is set by alpm_db_setserver */ pm_printf(PM_LOG_ERROR, _("could not add server URL to database '%s': %s (%s)\n"), - dbname, server, alpm_strerrorlast()); + dbname, server, alpm_strerror(alpm_errno(config->handle))); free(server); return 1; } @@ -460,7 +460,7 @@ static int setup_libalpm(void) ret = alpm_option_set_logfile(handle, config->logfile); if(ret != 0) { pm_printf(PM_LOG_ERROR, _("problem setting logfile '%s' (%s)\n"), - config->logfile, alpm_strerrorlast()); + config->logfile, alpm_strerror(alpm_errno(config->handle))); return ret; } @@ -470,7 +470,7 @@ static int setup_libalpm(void) ret = alpm_option_set_signaturedir(handle, config->gpgdir); if(ret != 0) { pm_printf(PM_LOG_ERROR, _("problem setting gpgdir '%s' (%s)\n"), - config->gpgdir, alpm_strerrorlast()); + config->gpgdir, alpm_strerror(alpm_errno(config->handle))); return ret; } @@ -567,7 +567,7 @@ static int _parseconfig(const char *file, int parse_options, db = alpm_db_register_sync(config->handle, name); if(db == NULL) { pm_printf(PM_LOG_ERROR, _("could not register '%s' database (%s)\n"), - name, alpm_strerrorlast()); + name, alpm_strerror(alpm_errno(config->handle))); ret = 1; goto cleanup; } @@ -665,7 +665,7 @@ static int _parseconfig(const char *file, int parse_options, ret = alpm_db_set_pgp_verify(db, level); if(ret != 0) { pm_printf(PM_LOG_ERROR, _("could not add set verify option for database '%s': %s (%s)\n"), - alpm_db_get_name(db), value, alpm_strerrorlast()); + alpm_db_get_name(db), value, alpm_strerror(alpm_errno(config->handle))); goto cleanup; } } else { |