summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@petra.hos.u-szeged.hu>2007-07-13 23:03:23 +0200
committerDan McGee <dan@archlinux.org>2007-07-15 16:37:38 +0200
commitc2920033d078768db08c338f4908033503abfc08 (patch)
treeea023d55227977f317b5baac9287d32d5d10f515 /lib/libalpm/sync.c
parent66b09410b4da950d4be95128333128fdb2658b3c (diff)
downloadpacman-c2920033d078768db08c338f4908033503abfc08.tar.gz
pacman-c2920033d078768db08c338f4908033503abfc08.tar.xz
libalpm/deps.c : cleanup + little fix for resolvedeps.
The resolvedeps function was a bit negligent, as showed by the sync011 pactest. Reference : http://www.archlinux.org/pipermail/pacman-dev/2007-July/008782.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 1948c5ff..41ed144a 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -380,7 +380,6 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
{
alpm_list_t *deps = NULL;
alpm_list_t *list = NULL; /* allow checkdeps usage with trans->packages */
- alpm_list_t *trail = NULL; /* breadcrumb list to avoid running in circles */
alpm_list_t *i, *j;
int ret = 0;
@@ -404,8 +403,8 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
_alpm_log(PM_LOG_DEBUG, "resolving target's dependencies");
for(i = trans->packages; i; i = i->next) {
pmpkg_t *spkg = ((pmsyncpkg_t *)i->data)->pkg;
- if(_alpm_resolvedeps(db_local, dbs_sync, spkg, list,
- trail, trans, data) == -1) {
+ if(_alpm_resolvedeps(db_local, dbs_sync, spkg, &list,
+ trans, data) == -1) {
/* pm_errno is set by resolvedeps */
ret = -1;
goto cleanup;
@@ -474,7 +473,6 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
goto cleanup;
}
- alpm_list_free(trail);
}
/* We don't care about conflicts if we're just printing uris */
@@ -710,7 +708,6 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
cleanup:
alpm_list_free(list);
- alpm_list_free(trail);
return(ret);
}