summaryrefslogtreecommitdiff
path: root/src/pacman
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-06-24 14:55:32 -0400
committerDave Reisner <d@falconindy.com>2011-06-24 14:55:32 -0400
commit2d32a9a3a348d25d6d0f3d12752399bf7fdf6570 (patch)
treebb330206ea0caa95c9d337a6c5b4b99b6034e756 /src/pacman
parent8581694ceb63f4ed2854206b38574599c3d9df28 (diff)
parente06586ceb49a0dc7e59996ae3a1483337d2ada05 (diff)
Merge branch 'master' of git://projects.archlinux.org/pacman
* 'master' of git://projects.archlinux.org/pacman: pactree: carry a list of databases for dep resolution makepkg: Remove a lone quotation mark makepkg: remove the cleancache option Don't require a transaction for sync DB updates Move locking functions to handle Add a 'valid' flag to the database object Move database 'version' check to registration time Do database signature checking at load time
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/conf.c19
-rw-r--r--src/pacman/sync.c7
-rw-r--r--src/pacman/util.c3
3 files changed, 6 insertions, 23 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 081cdd5e..076e854d 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -449,6 +449,9 @@ static int setup_libalpm(void)
if(!handle) {
pm_printf(PM_LOG_ERROR, _("failed to initialize alpm library (%s)\n"),
alpm_strerror(err));
+ if(err == PM_ERR_DB_VERSION) {
+ pm_printf(PM_LOG_ERROR, _(" try running pacman-db-upgrade\n"));
+ }
return -1;
}
config->handle = handle;
@@ -460,7 +463,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_strerror(alpm_errno(config->handle)));
+ config->logfile, alpm_strerror(alpm_errno(handle)));
return ret;
}
@@ -470,7 +473,7 @@ static int setup_libalpm(void)
ret = alpm_option_set_gpgdir(handle, config->gpgdir);
if(ret != 0) {
pm_printf(PM_LOG_ERROR, _("problem setting gpgdir '%s' (%s)\n"),
- config->gpgdir, alpm_strerror(alpm_errno(config->handle)));
+ config->gpgdir, alpm_strerror(alpm_errno(handle)));
return ret;
}
@@ -542,7 +545,7 @@ static int finish_section(struct section_t *section, int parse_options)
}
/* if we are not looking at options sections only, register a db */
- db = alpm_db_register_sync(config->handle, section->name);
+ db = alpm_db_register_sync(config->handle, section->name, section->sigverify);
if(db == NULL) {
pm_printf(PM_LOG_ERROR, _("could not register '%s' database (%s)\n"),
section->name, alpm_strerror(alpm_errno(config->handle)));
@@ -550,16 +553,6 @@ static int finish_section(struct section_t *section, int parse_options)
goto cleanup;
}
- if(section->sigverify) {
- if(alpm_db_set_pgp_verify(db, section->sigverify)) {
- pm_printf(PM_LOG_ERROR,
- _("could not set verify option for database '%s' (%s)\n"),
- section->name, alpm_strerror(alpm_errno(config->handle)));
- ret = 1;
- goto cleanup;
- }
- }
-
for(i = section->servers; i; i = alpm_list_next(i)) {
char *value = alpm_list_getdata(i);
if(_add_mirror(db, value) != 0) {
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 6c86bd10..f242c827 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -283,10 +283,6 @@ static int sync_synctree(int level, alpm_list_t *syncs)
alpm_list_t *i;
int success = 0, ret;
- if(trans_init(0) == -1) {
- return 0;
- }
-
for(i = syncs; i; i = alpm_list_next(i)) {
pmdb_t *db = alpm_list_getdata(i);
@@ -302,9 +298,6 @@ static int sync_synctree(int level, alpm_list_t *syncs)
}
}
- if(trans_release() == -1) {
- return 0;
- }
/* We should always succeed if at least one DB was upgraded - we may possibly
* fail later with unresolved deps, but that should be rare, and would be
* expected
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 66f127c6..77a7e56c 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -68,9 +68,6 @@ int trans_init(pmtransflag_t flags)
" running, you can remove %s\n"),
alpm_option_get_lockfile(config->handle));
}
- else if(err == PM_ERR_DB_VERSION) {
- fprintf(stderr, _(" try running pacman-db-upgrade\n"));
- }
return -1;
}