summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-31 06:39:59 +0000
committerAaron Griffin <aaron@archlinux.org>2006-10-31 06:39:59 +0000
commitaf2fb3324a925af6caa9d53aacac92173fc47885 (patch)
treeb7abb647d27db75a1d937eea24cd5eccac6e5db8 /lib/libalpm/add.c
parent78c0badc9b3629c5156d4bd0733a3e9a1e4e92c6 (diff)
downloadpacman-af2fb3324a925af6caa9d53aacac92173fc47885.tar.xz
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.
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c5
1 files changed, 2 insertions, 3 deletions
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) {