diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-10-31 06:39:59 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-10-31 06:39:59 +0000 |
commit | af2fb3324a925af6caa9d53aacac92173fc47885 (patch) | |
tree | b7abb647d27db75a1d937eea24cd5eccac6e5db8 /lib/libalpm/remove.c | |
parent | 78c0badc9b3629c5156d4bd0733a3e9a1e4e92c6 (diff) | |
download | pacman-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/remove.c')
-rw-r--r-- | lib/libalpm/remove.c | 6 |
1 files changed, 4 insertions, 2 deletions
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)) { |