diff options
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2007-11-14 12:42:15 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-11-14 18:48:34 -0600 |
commit | 85b06f127600131e11afb3629e2609334dee00df (patch) | |
tree | e99ca85fa287d45a1b5c9822a5d100087c859ebc /lib/libalpm/remove.c | |
parent | 46ec9e3548b5b567c7eb18c360f54a77b6313b12 (diff) | |
download | pacman-85b06f127600131e11afb3629e2609334dee00df.tar.xz |
alpm_list_add == alpm_list_add_last
It's time to define that alpm_list_add(list, foo) adds 'foo' to the end of
'list' and returns with 'list', because:
1. list is a list, not a set.
2. sortbydeps _needs_ an alpm_list_add definition to work properly.
As a first step, I used this definition in recursedeps.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
[Dan: punctuation cleanup in commit message and code comments, added comment
to alpm_list_add]
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r-- | lib/libalpm/remove.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index c4e44398..86cfee68 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -137,11 +137,6 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data) } } - if(trans->flags & PM_TRANS_FLAG_RECURSE) { - _alpm_log(PM_LOG_DEBUG, "finding removable dependencies\n"); - _alpm_recursedeps(db, &trans->packages, 0); - } - /* re-order w.r.t. dependencies */ _alpm_log(PM_LOG_DEBUG, "sorting by dependencies\n"); lp = _alpm_sortbydeps(trans->packages, PM_TRANS_TYPE_REMOVE); @@ -149,6 +144,11 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data) alpm_list_free(trans->packages); trans->packages = lp; + if(trans->flags & PM_TRANS_FLAG_RECURSE) { + _alpm_log(PM_LOG_DEBUG, "finding removable dependencies\n"); + _alpm_recursedeps(db, trans->packages, 0); + } + EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL); return(0); |