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/remove.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/remove.c') diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 39937eed..5659e1e9 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -192,7 +192,7 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db) /* iterate through the list backwards, unlinking files */ for(lp = _alpm_list_last(info->files); lp; lp = lp->prev) { int nb = 0; - double percent; + double percent = 0.0; char *file = lp->data; char *md5 =_alpm_needbackup(file, info->backup); char *sha1 =_alpm_needbackup(file, info->backup); @@ -294,6 +294,7 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db) for(lp = info->depends; lp; lp = lp->next) { pmpkg_t *depinfo = NULL; pmdepend_t depend; + void *vdata; char *data; if(_alpm_splitdep((char*)lp->data, &depend)) { continue; @@ -324,7 +325,8 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db) } } /* splice out this entry from requiredby */ - depinfo->requiredby = _alpm_list_remove(depinfo->requiredby, info->name, str_cmp, (void **)&data); + depinfo->requiredby = _alpm_list_remove(depinfo->requiredby, info->name, str_cmp, &vdata); + data = vdata; FREE(data); _alpm_log(PM_LOG_DEBUG, _("updating 'requiredby' field for package '%s'"), depinfo->name); if(_alpm_db_write(db, depinfo, INFRQ_DEPENDS)) { -- cgit v1.2.3-24-g4f1b