Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 066f1f22..551f9269 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -471,10 +471,8 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
* holds to package objects. */
trans->unresolvable = unresolvable;
- /* re-order w.r.t. dependencies */
alpm_list_free(trans->add);
- trans->add = _alpm_sortbydeps(handle, resolved, 0);
- alpm_list_free(resolved);
+ trans->add = resolved;
EVENT(handle, ALPM_EVENT_RESOLVEDEPS_DONE, NULL, NULL);
}
@@ -628,6 +626,11 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
}
goto cleanup;
}
+
+ /* re-order w.r.t. dependencies */
+ alpm_list_t *add_orig = trans->add;
+ trans->add = _alpm_sortbydeps(handle, add_orig, trans->remove, 0);
+ alpm_list_free(add_orig);
}
for(i = trans->add; i; i = i->next) {
/* update download size field */