summaryrefslogtreecommitdiffstats
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-29 00:41:15 +0100
committerDan McGee <dan@archlinux.org>2011-01-29 19:13:56 +0100
commitef86da97f54a90ee4ba3ba8ea7963135e7bae8ed (patch)
tree99c492d170d3780ac2530413031593cc248a8fd3 /src/pacman/pacman.c
parent9b876fff09f2af10cba6824bec03d8fe3e167b5b (diff)
downloadpacman-ef86da97f54a90ee4ba3ba8ea7963135e7bae8ed.tar.gz
pacman-ef86da97f54a90ee4ba3ba8ea7963135e7bae8ed.tar.xz
Remove need to explicitly register the local DB
Perform the cheap struct and string setup of the local DB at handle initialization time to match the teardown we do when releasing the handle. If the local DB is not needed, all real initialization is done lazily after DB paths and other things have been configured anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index c2670604..45500cfb 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -57,7 +57,6 @@
#include "conf.h"
#include "package.h"
-pmdb_t *db_local;
/* list of targets specified on command line */
static alpm_list_t *pm_targets;
@@ -1433,14 +1432,6 @@ int main(int argc, char *argv[])
list_display("Targets :", pm_targets);
}
- /* Opening local database */
- db_local = alpm_db_register_local();
- if(db_local == NULL) {
- pm_printf(PM_LOG_ERROR, _("could not register 'local' database (%s)\n"),
- alpm_strerrorlast());
- cleanup(EXIT_FAILURE);
- }
-
/* Log commandline */
if(needs_root()) {
cl_to_log(argc, argv);