mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
libalpm/remove.c : Rsd combination.
Currently the d (nodeps) option skips the s (recursive) part, rendering the Rsd combination totally useless. This patch makes a recursive removal still possible using the nodeps option, as Romashka asked there : http://bugs.archlinux.org/task/6057#comment17784 Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
This commit is contained in:
parent
c0a7d9d82d
commit
7234785601
@ -96,9 +96,13 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
|
||||
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
|
||||
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
||||
|
||||
if(!(trans->flags & (PM_TRANS_FLAG_NODEPS)) && (trans->type != PM_TRANS_TYPE_UPGRADE)) {
|
||||
if(trans->type == PM_TRANS_TYPE_UPGRADE) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
|
||||
|
||||
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
|
||||
_alpm_log(PM_LOG_DEBUG, "looking for unsatisfied dependencies");
|
||||
lp = _alpm_checkdeps(db, trans->type, trans->packages);
|
||||
if(lp != NULL) {
|
||||
@ -129,6 +133,7 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
|
||||
RET_ERR(PM_ERR_UNSATISFIED_DEPS, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(trans->flags & PM_TRANS_FLAG_RECURSE) {
|
||||
_alpm_log(PM_LOG_DEBUG, "finding removable dependencies");
|
||||
@ -143,7 +148,6 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
|
||||
trans->packages = lp;
|
||||
|
||||
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user