summaryrefslogtreecommitdiffstats
path: root/src/pacman
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-21 02:54:01 +0200
committerDan McGee <dan@archlinux.org>2011-06-24 10:31:32 +0200
commit1150d9e15aaea2ae1f259995d11442f491ef0af7 (patch)
tree537cb6094479710207aea562fed48bc48deb184b /src/pacman
parentdb3b86e7f34f4c3ccb42e98465f2069aa642a85f (diff)
downloadpacman-1150d9e15aaea2ae1f259995d11442f491ef0af7.tar.gz
pacman-1150d9e15aaea2ae1f259995d11442f491ef0af7.tar.xz
Move database 'version' check to registration time
This is another step toward doing both local database validation (ensuring we don't have depends files) and sync database validation (via signatures if present) when the database is registered. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/conf.c3
-rw-r--r--src/pacman/util.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 5c2a11d3..c5f78d40 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) {
+ fprintf(stderr, _(" try running pacman-db-upgrade\n"));
+ }
return -1;
}
config->handle = handle;
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;
}