From af2fb3324a925af6caa9d53aacac92173fc47885 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 31 Oct 2006 06:39:59 +0000 Subject: Numerous changes: * Furthered the "lazy caching" to force the pkgcache to read nothing (INFRQ_NONE) by default. Anything requiring package data should now check the infolevel of each package and attempt to update it. This could be ironed out a bit more later (by using the front-end get_info function * Switched to libfetch. Drastic changes to the download code and the callback progress bar functions. Also fixed the return value of _alpm_downloadfiles_forreal. Downloading now supports http, ftp, https, and files urls, along with 'mtime's and numerous other fancy features from libfetch. --- lib/libalpm/add.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 82b238bd..16cb13a5 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -306,7 +306,7 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, pmlist_t **data) int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db) { int i, ret = 0, errors = 0, needdisp = 0; - double percent; + double percent = 0.0; register struct archive *archive; struct archive_entry *entry; char expath[PATH_MAX], cwd[PATH_MAX] = "", *what; @@ -360,7 +360,6 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db) /* copy over the install reason */ if(!(local->infolevel & INFRQ_DESC)) { - _alpm_log(PM_LOG_DEBUG, _("loading DESC info for '%s'"), local->name); _alpm_db_read(db, INFRQ_DESC, local); } info->reason = local->reason; @@ -732,7 +731,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db) /* Update the requiredby field by scanning the whole database * looking for packages depending on the package to add */ - for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) { + for(lp = _alpm_db_get_pkgcache(db, INFRQ_DEPENDS); lp; lp = lp->next) { pmpkg_t *tmpp = lp->data; pmlist_t *tmppm = NULL; if(tmpp == NULL) { -- cgit v1.2.3