index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2013-10-17 23:38:58 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-10-31 16:20:02 +1000 |
commit | c2134fde2be179c490b33765fe5504be96291b95 (patch) | |
tree | 52c3e7b6c813591ce1f71b2ad5161e57b142ed71 /lib/libalpm/sync.c | |
parent | 2194eddf30bea718c2b5fd6b86d2a626783fc901 (diff) |
-rw-r--r-- | lib/libalpm/sync.c | 9 |
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 */ |