mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
Fix for remove052.py by moving recursedeps before checkdeps.
In the case of -Rs operation, first pulling the dependencies with recursedeps before calling checkdeps takes care of the dependency chain of remove052 pactest. In the case of -Rcs, we can keep the old behavior because we have no problem there (any dependency returned by checkdeps will be added to the remove list because of -Rc) and we have to run recursedeps on the final remove list anyway to catch all orphans. Ref.: http://www.archlinux.org/pipermail/pacman-dev/2008-April/011569.html Signed-off-by: Nagy Gabor <ngaba at bibl.u-szeged.hu> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
ae40d1c05b
commit
ad54b28680
@ -149,6 +149,11 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
|
||||
return(0);
|
||||
}
|
||||
|
||||
if((trans->flags & PM_TRANS_FLAG_RECURSE) && !(trans->flags & PM_TRANS_FLAG_CASCADE)) {
|
||||
_alpm_log(PM_LOG_DEBUG, "finding removable dependencies\n");
|
||||
_alpm_recursedeps(db, trans->packages, trans->flags & PM_TRANS_FLAG_RECURSEALL);
|
||||
}
|
||||
|
||||
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
|
||||
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
|
||||
|
||||
@ -181,7 +186,8 @@ 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) {
|
||||
/* -Rcs == -Rc then -Rs */
|
||||
if((trans->flags & PM_TRANS_FLAG_CASCADE) && (trans->flags & PM_TRANS_FLAG_RECURSE)) {
|
||||
_alpm_log(PM_LOG_DEBUG, "finding removable dependencies\n");
|
||||
_alpm_recursedeps(db, trans->packages, trans->flags & PM_TRANS_FLAG_RECURSEALL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user